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