[package] switch irssi to using the build variants infrastructure (#6726)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@19900 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
bb63b819ec
commit
386efd318a
@ -17,6 +17,8 @@ PKG_MD5SUM:=00efe7638dd596d5930dfa2aeae87b3a
|
|||||||
|
|
||||||
PKG_FIXUP:=libtool
|
PKG_FIXUP:=libtool
|
||||||
|
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/irssi/Default
|
define Package/irssi/Default
|
||||||
@ -24,7 +26,7 @@ define Package/irssi/Default
|
|||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
DEPENDS:=+glib2 +libncurses
|
DEPENDS:=+glib2 +libncurses
|
||||||
TITLE:=console irc client
|
TITLE:=Console IRC client
|
||||||
URL:=http://irssi.org/
|
URL:=http://irssi.org/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -34,71 +36,55 @@ endef
|
|||||||
|
|
||||||
define Package/irssi
|
define Package/irssi
|
||||||
$(call Package/irssi/Default)
|
$(call Package/irssi/Default)
|
||||||
TITLE+= (without OpenSSL support)
|
TITLE+= (with OpenSSL support)
|
||||||
|
DEPENDS+= +libopenssl
|
||||||
|
VARIANT:=ssl
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/irssi/description
|
define Package/irssi/description
|
||||||
$(call Package/irssi/Default/description)
|
|
||||||
This package is built without OpenSSL support.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/irssi-openssl
|
|
||||||
$(call Package/irssi/Default)
|
|
||||||
TITLE+= (with OpenSSL support)
|
|
||||||
DEPENDS+= +libopenssl
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/irssi-openssl/description
|
|
||||||
$(call Package/irssi/Default/description)
|
$(call Package/irssi/Default/description)
|
||||||
This package is built with OpenSSL support.
|
This package is built with OpenSSL support.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Template
|
define Package/irssi-nossl
|
||||||
|
$(call Package/irssi/Default)
|
||||||
$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
|
TITLE+= (without OpenSSL support)
|
||||||
-$(MAKE) -C $(PKG_BUILD_DIR) clean
|
VARIANT:=nossl
|
||||||
$(call Build/Configure/Default, \
|
|
||||||
--with-perl=no \
|
|
||||||
--with-glib-prefix="$(STAGING_DIR)/usr" \
|
|
||||||
--with-textui \
|
|
||||||
--without-terminfo \
|
|
||||||
--without-bot \
|
|
||||||
--disable-proxy \
|
|
||||||
$(3))
|
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR)
|
|
||||||
( cd $(PKG_BUILD_DIR); mv -f src/fe-text/irssi $(PKG_NAME)-$(2) )
|
|
||||||
touch $$@
|
|
||||||
|
|
||||||
$(STAMP_BUILT): $(STAMP_BUILT)-$(2)
|
|
||||||
|
|
||||||
define Package/$(1)/install
|
|
||||||
$(INSTALL_DIR) $$(1)/usr/bin
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(2) $$(1)/usr/bin/$(PKG_NAME)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/irssi-nossl/description
|
||||||
|
$(call Package/irssi/Default/description)
|
||||||
|
This package is built without OpenSSL support.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--with-perl=no \
|
||||||
|
--with-glib-prefix="$(STAGING_DIR)/usr" \
|
||||||
|
--with-textui \
|
||||||
|
--without-terminfo \
|
||||||
|
--without-bot \
|
||||||
|
--disable-proxy
|
||||||
|
|
||||||
EXTRA_CFLAGS+=$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv/include -I$(STAGING_DIR)/usr/lib/libintl/include
|
EXTRA_CFLAGS+=$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv/include -I$(STAGING_DIR)/usr/lib/libintl/include
|
||||||
EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib/libiconv/lib -L$(STAGING_DIR)/usr/lib/libintl/lib -lncurses
|
EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib/libiconv/lib -L$(STAGING_DIR)/usr/lib/libintl/lib -lncurses
|
||||||
|
|
||||||
ifneq ($(SDK)$(CONFIG_PACKAGE_irssi),)
|
ifeq ($(BUILD_VARIANT),ssl)
|
||||||
define Build/without-ssl
|
CONFIGURE_ARGS += \
|
||||||
$(call Build/Template,irssi,without-ssl, \
|
--with-ssl="$(STAGING_DIR)/usr"
|
||||||
--without-ssl \
|
|
||||||
--disable-ssl \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
endif
|
endif
|
||||||
$(eval $(Build/without-ssl))
|
|
||||||
|
|
||||||
ifneq ($(SDK)$(CONFIG_PACKAGE_irssi-openssl),)
|
ifeq ($(BUILD_VARIANT),nossl)
|
||||||
define Build/with-openssl
|
CONFIGURE_ARGS += \
|
||||||
$(call Build/Template,irssi-openssl,with-openssl, \
|
--without-ssl \
|
||||||
--with-ssl="$(STAGING_DIR)/usr" \
|
--disable-ssl
|
||||||
)
|
|
||||||
endef
|
|
||||||
endif
|
endif
|
||||||
$(eval $(Build/with-openssl))
|
|
||||||
|
define Package/irssi/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/fe-text/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME)
|
||||||
|
endef
|
||||||
|
|
||||||
|
Package/irssi-nossl/install = $(Package/irssi/install)
|
||||||
|
|
||||||
$(eval $(call BuildPackage,irssi))
|
$(eval $(call BuildPackage,irssi))
|
||||||
$(eval $(call BuildPackage,irssi-openssl))
|
$(eval $(call BuildPackage,irssi-nossl))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user