switch ctorrent to using the build variants infrastructure
* ctorrent is linked to openssl * ctorrent-nossl uses builtin SHA-1 git-svn-id: svn://svn.openwrt.org/openwrt/packages@19914 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
4bb8abe103
commit
1e91b21a6e
@ -9,13 +9,15 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=ctorrent
|
PKG_NAME:=ctorrent
|
||||||
PKG_VERSION:=dnh3.3.2
|
PKG_VERSION:=dnh3.3.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@SF/dtorrent \
|
PKG_SOURCE_URL:=@SF/dtorrent \
|
||||||
http://www.rahul.net/dholmes/ctorrent/
|
http://www.rahul.net/dholmes/ctorrent/
|
||||||
PKG_MD5SUM:=59b23dd05ff70791cd6449effa7fc3b6
|
PKG_MD5SUM:=59b23dd05ff70791cd6449effa7fc3b6
|
||||||
|
|
||||||
|
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/ctorrent/Default
|
define Package/ctorrent/Default
|
||||||
@ -35,64 +37,46 @@ endef
|
|||||||
|
|
||||||
define Package/ctorrent
|
define Package/ctorrent
|
||||||
$(call Package/ctorrent/Default)
|
$(call Package/ctorrent/Default)
|
||||||
TITLE+= (with builtin SHA-1 support)
|
TITLE+= (with OpenSSL support)
|
||||||
|
VARIANT:=ssl
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ctorrent/description
|
define Package/ctorrent/description
|
||||||
$(call Package/ctorrent/Default/description)
|
|
||||||
This package is built with builtin (Steve Reid's public-domain) SHA-1 support
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/ctorrent-openssl
|
|
||||||
$(call Package/ctorrent/Default)
|
|
||||||
DEPENDS+= +libopenssl
|
|
||||||
TITLE+= (with OpenSSL support)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/ctorrent-openssl/description
|
|
||||||
$(call Package/ctorrent/Default/description)
|
$(call Package/ctorrent/Default/description)
|
||||||
This package is built with OpenSSL support.
|
This package is built with OpenSSL support.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Template
|
define Package/ctorrent-nossl
|
||||||
|
$(call Package/ctorrent/Default)
|
||||||
$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
|
TITLE+= (with builtin SHA-1)
|
||||||
-$(MAKE) -C $(PKG_BUILD_DIR) clean
|
VARIANT:=nossl
|
||||||
$(call Build/Configure/Default,$(3))
|
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR)
|
|
||||||
( cd $(PKG_BUILD_DIR); mv -f $(PKG_NAME) $(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/ctorrent-nossl/description
|
||||||
|
$(call Package/ctorrent/Default/description)
|
||||||
|
This package is built with builtin (Steve Reid's public-domain) SHA-1 support
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_VARS += \
|
CONFIGURE_VARS += \
|
||||||
CXX="g++-uc" \
|
CXX="g++-uc" \
|
||||||
CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
|
CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
|
||||||
|
|
||||||
ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent),)
|
ifeq ($(BUILD_VARIANT),ssl)
|
||||||
define Build/with-ssl
|
CONFIGURE_ARGS += \
|
||||||
$(call Build/Template,ctorrent,with-ssl, \
|
--with-ssl="$(STAGING_DIR)/usr"
|
||||||
--with-ssl=no \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
endif
|
endif
|
||||||
$(eval $(Build/with-ssl))
|
|
||||||
|
|
||||||
ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent-openssl),)
|
ifeq ($(BUILD_VARIANT),nossl)
|
||||||
define Build/with-openssl
|
CONFIGURE_ARGS += \
|
||||||
$(call Build/Template,ctorrent-openssl,with-openssl, \
|
--with-ssl=no
|
||||||
--with-ssl="$(STAGING_DIR)/usr" \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
endif
|
endif
|
||||||
$(eval $(Build/with-openssl))
|
|
||||||
|
define Package/ctorrent/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME)
|
||||||
|
endef
|
||||||
|
|
||||||
|
Package/ctorrent-nossl/install = $(Package/ctorrent/install)
|
||||||
|
|
||||||
$(eval $(call BuildPackage,ctorrent))
|
$(eval $(call BuildPackage,ctorrent))
|
||||||
$(eval $(call BuildPackage,ctorrent-openssl))
|
$(eval $(call BuildPackage,ctorrent-nossl))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user