[package] ctorrent, dansduardian: These packages don't use libtool, thus they
[openwrt/svn-archive/archive.git] / net / ctorrent / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ctorrent
11 PKG_VERSION:=dnh3.3.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/dtorrent \
16 http://www.rahul.net/dholmes/ctorrent/
17 PKG_MD5SUM:=59b23dd05ff70791cd6449effa7fc3b6
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/ctorrent/Default
22 SUBMENU:=BitTorrent
23 SECTION:=net
24 CATEGORY:=Network
25 DEPENDS:=+uclibcxx
26 TITLE:=console-based BitTorrent client
27 URL:=http://www.rahul.net/dholmes/ctorrent/
28 endef
29
30 define Package/ctorrent/Default/description
31 CTorrent is a BitTorrent client written in the C programming language,
32 known to be a very robust and mature programming language, which produces
33 fast and optimized application.
34 endef
35
36 define Package/ctorrent
37 $(call Package/ctorrent/Default)
38 TITLE+= (with builtin SHA-1 support)
39 endef
40
41 define Package/ctorrent/description
42 $(call Package/ctorrent/Default/description)
43 This package is built with builtin (Steve Reid's public-domain) SHA-1 support
44 endef
45
46 define Package/ctorrent-openssl
47 $(call Package/ctorrent/Default)
48 DEPENDS+= +libopenssl
49 TITLE+= (with OpenSSL support)
50 endef
51
52 define Package/ctorrent-openssl/description
53 $(call Package/ctorrent/Default/description)
54 This package is built with OpenSSL support.
55 endef
56
57 define Build/Template
58
59 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
60 -$(MAKE) -C $(PKG_BUILD_DIR) clean
61 $(call Build/Configure/Default,$(3))
62 $(MAKE) -C $(PKG_BUILD_DIR)
63 ( cd $(PKG_BUILD_DIR); mv -f $(PKG_NAME) $(PKG_NAME)-$(2) )
64 touch $$@
65
66 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
67
68 define Package/$(1)/install
69 $(INSTALL_DIR) $$(1)/usr/bin
70 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(2) $$(1)/usr/bin/$(PKG_NAME)
71 endef
72
73 endef
74
75 CONFIGURE_VARS += \
76 CXX="g++-uc" \
77 CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
78
79 ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent),)
80 define Build/with-ssl
81 $(call Build/Template,ctorrent,with-ssl, \
82 --with-ssl=no \
83 )
84 endef
85 endif
86 $(eval $(Build/with-ssl))
87
88 ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent-openssl),)
89 define Build/with-openssl
90 $(call Build/Template,ctorrent-openssl,with-openssl, \
91 --with-ssl="$(STAGING_DIR)/usr" \
92 )
93 endef
94 endif
95 $(eval $(Build/with-openssl))
96
97 $(eval $(call BuildPackage,ctorrent))
98 $(eval $(call BuildPackage,ctorrent-openssl))