7fc101f3bf4fb6e6aa83734665ada2aa677a8510
[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 PKG_FIXUP = libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/ctorrent/Default
24 SUBMENU:=BitTorrent
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+uclibcxx
28 TITLE:=console-based BitTorrent client
29 URL:=http://www.rahul.net/dholmes/ctorrent/
30 endef
31
32 define 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.
36 endef
37
38 define Package/ctorrent
39 $(call Package/ctorrent/Default)
40 TITLE+= (with builtin SHA-1 support)
41 endef
42
43 define Package/ctorrent/description
44 $(call Package/ctorrent/Default/description)
45 This package is built with builtin (Steve Reid's public-domain) SHA-1 support
46 endef
47
48 define Package/ctorrent-openssl
49 $(call Package/ctorrent/Default)
50 DEPENDS+= +libopenssl
51 TITLE+= (with OpenSSL support)
52 endef
53
54 define Package/ctorrent-openssl/description
55 $(call Package/ctorrent/Default/description)
56 This package is built with OpenSSL support.
57 endef
58
59 define 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
70 define Package/$(1)/install
71 $(INSTALL_DIR) $$(1)/usr/bin
72 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(2) $$(1)/usr/bin/$(PKG_NAME)
73 endef
74
75 endef
76
77 CONFIGURE_VARS += \
78 CXX="g++-uc" \
79 CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
80
81 ifneq ($(SDK)$(CONFIG_PACKAGE_ctorrent),)
82 define Build/with-ssl
83 $(call Build/Template,ctorrent,with-ssl, \
84 --with-ssl=no \
85 )
86 endef
87 endif
88 $(eval $(Build/with-ssl))
89
90 ifneq ($(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
96 endif
97 $(eval $(Build/with-openssl))
98
99 $(eval $(call BuildPackage,ctorrent))
100 $(eval $(call BuildPackage,ctorrent-openssl))