From: Oliver Ertl Date: Thu, 14 Feb 2008 10:25:09 +0000 (+0000) Subject: [Packages] net/ctorrent: X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=46996756f643ffcff10f85e040266dadfbce88b7;p=openwrt%2Fsvn-archive%2Farchive.git [Packages] net/ctorrent: Build two version of the package * ctorrent: with builtin SSL support * ctorrent-openssl: with OpenSSL support SVN-Revision: 10457 --- diff --git a/net/ctorrent/Makefile b/net/ctorrent/Makefile index 8f5676732e..b4f07cf1a5 100644 --- a/net/ctorrent/Makefile +++ b/net/ctorrent/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 OpenWrt.org +# Copyright (C) 2007,2008 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -20,32 +20,81 @@ PKG_FIXUP = libtool include $(INCLUDE_DIR)/package.mk -define Package/ctorrent +define Package/ctorrent/Default SUBMENU:=BitTorrent SECTION:=net CATEGORY:=Network - DEPENDS:=+libopenssl +uclibcxx + DEPENDS:=+uclibcxx TITLE:=console-based BitTorrent client URL:=http://www.rahul.net/dholmes/ctorrent/ endef +define Package/ctorrent/Default/description + CTorrent is a BitTorrent client written in the C programming language, + known to be a very robust and mature programming language, which produces + fast and optimized application. +endef + +define Package/ctorrent +$(call Package/ctorrent/Default) + TITLE+= (with builtin SHA-1 support) +endef + define Package/ctorrent/description - CTorrent is a BitTorrent client written in the C programming language, - known to be a very robust and mature programming language, which produces - fast and optimized application. +$(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) + This package is built with OpenSSL support. endef - + +define Build/Template + +$(STAMP_BUILT)-$(2): $(STAMP_PREPARED) + -$(MAKE) -C $(PKG_BUILD_DIR) clean + $(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 + CONFIGURE_VARS += \ CXX="g++-uc" \ CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \ -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install -endef +ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent),) + define Build/with-ssl + $(call Build/Template,ctorrent,with-ssl, \ + --with-ssl=no \ + ) + endef +endif +$(eval $(Build/with-ssl)) -define Package/ctorrent/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ -endef +ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent-openssl),) + define Build/with-openssl + $(call Build/Template,ctorrent-openssl,with-openssl, \ + --with-ssl="$(STAGING_DIR)/usr" \ + ) + endef +endif +$(eval $(Build/with-openssl)) $(eval $(call BuildPackage,ctorrent)) +$(eval $(call BuildPackage,ctorrent-openssl))