Changeset 10457


Ignore:
Timestamp:
2008-02-14T11:25:09+01:00 (10 years ago)
Author:
olli
Message:

[Packages] net/ctorrent:

Build two version of the package

  • ctorrent: with builtin SSL support
  • ctorrent-openssl: with OpenSSL support
File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/ctorrent/Makefile

    r9947 r10457  
    11# 
    2 # Copyright (C) 2007 OpenWrt.org 
     2# Copyright (C) 2007,2008 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    2121include $(INCLUDE_DIR)/package.mk 
    2222 
    23 define Package/ctorrent 
     23define Package/ctorrent/Default 
    2424  SUBMENU:=BitTorrent 
    2525  SECTION:=net 
    2626  CATEGORY:=Network 
    27   DEPENDS:=+libopenssl +uclibcxx 
     27  DEPENDS:=+uclibcxx 
    2828  TITLE:=console-based BitTorrent client 
    2929  URL:=http://www.rahul.net/dholmes/ctorrent/ 
    3030endef 
    3131 
     32define Package/ctorrent/Default/description 
     33        CTorrent is a BitTorrent client written in the C programming language, 
     34        known to be a very robust and mature programming language, which produces 
     35        fast and optimized application. 
     36endef 
     37 
     38define Package/ctorrent 
     39$(call Package/ctorrent/Default) 
     40  TITLE+= (with builtin SHA-1 support) 
     41endef 
     42 
    3243define Package/ctorrent/description 
    33  CTorrent is a BitTorrent client written in the C programming language,  
    34  known to be a very robust and mature programming language, which produces  
    35  fast and optimized application. 
     44$(call Package/ctorrent/Default/description) 
     45 This package is built with builtin (Steve Reid's public-domain) SHA-1 support 
    3646endef 
    37     
     47 
     48define Package/ctorrent-openssl 
     49$(call Package/ctorrent/Default) 
     50  DEPENDS+= +libopenssl 
     51  TITLE+= (with OpenSSL support) 
     52endef 
     53 
     54define Package/ctorrent-openssl/description 
     55$(call Package/ctorrent/Default/description) 
     56 This package is built with OpenSSL support. 
     57endef 
     58 
     59define Build/Template 
     60 
     61$(STAMP_BUILT)-$(2): $(STAMP_PREPARED) 
     62        -$(MAKE) -C $(PKG_BUILD_DIR) clean 
     63        $(call Build/Configure/Default,$(3)) 
     64        $(MAKE) -C $(PKG_BUILD_DIR) 
     65        ( cd $(PKG_BUILD_DIR); mv -f $(PKG_NAME) $(PKG_NAME)-$(2) ) 
     66        touch $$@ 
     67 
     68$(STAMP_BUILT): $(STAMP_BUILT)-$(2) 
     69 
     70define Package/$(1)/install 
     71        $(INSTALL_DIR) $$(1)/usr/bin 
     72        $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(2) $$(1)/usr/bin/$(PKG_NAME) 
     73endef 
     74 
     75endef 
     76 
    3877CONFIGURE_VARS += \ 
    3978        CXX="g++-uc" \ 
    4079        CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \ 
    4180 
    42 define Build/Compile 
    43         $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install 
    44 endef 
     81ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent),) 
     82  define Build/with-ssl 
     83    $(call Build/Template,ctorrent,with-ssl, \ 
     84        --with-ssl=no \ 
     85    ) 
     86  endef 
     87endif 
     88$(eval $(Build/with-ssl)) 
    4589 
    46 define Package/ctorrent/install  
    47         $(INSTALL_DIR) $(1)/usr/bin 
    48         $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ 
    49 endef 
     90ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent-openssl),) 
     91  define Build/with-openssl 
     92    $(call Build/Template,ctorrent-openssl,with-openssl, \ 
     93        --with-ssl="$(STAGING_DIR)/usr" \ 
     94    )   
     95  endef 
     96endif 
     97$(eval $(Build/with-openssl)) 
    5098 
    5199$(eval $(call BuildPackage,ctorrent)) 
     100$(eval $(call BuildPackage,ctorrent-openssl)) 
Note: See TracChangeset for help on using the changeset viewer.