ctorrent: import from packages
[feed/packages.git] / net / ctorrent-svn / 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-svn
11 PKG_REV:=322
12 PKG_VERSION:=r$(PKG_REV)
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=https://dtorrent.svn.sourceforge.net/svnroot/dtorrent/dtorrent/trunk
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_PROTO:=svn
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/ctorrent-svn/Default
26 SUBMENU:=BitTorrent
27 SECTION:=net
28 CATEGORY:=Network
29 DEPENDS:=+uclibcxx
30 TITLE:=console-based BitTorrent client
31 MAINTAINER:=Peter Wagner <tripolar@gmx.at>
32 URL:=http://www.rahul.net/dholmes/ctorrent/
33 endef
34
35 define Package/ctorrent-svn/Default/description
36 CTorrent is a BitTorrent client written in the C programming language,
37 known to be a very robust and mature programming language, which produces
38 fast and optimized application.
39 endef
40
41 define Package/ctorrent-svn
42 $(call Package/ctorrent-svn/Default)
43 TITLE+= (with OpenSSL support)
44 DEPENDS+=+libopenssl
45 VARIANT:=ssl
46 endef
47
48 define Package/ctorrent-svn/description
49 $(call Package/ctorrent-svn/Default/description)
50 This package is built with OpenSSL support.
51 endef
52
53 define Package/ctorrent-svn-nossl
54 $(call Package/ctorrent-svn/Default)
55 TITLE+= (with builtin SHA-1)
56 VARIANT:=nossl
57 endef
58
59 define Package/ctorrent-svn-nossl/description
60 $(call Package/ctorrent-svn/Default/description)
61 This package is built with builtin (Steve Reid's public-domain) SHA-1 support
62 endef
63
64 CONFIGURE_VARS += \
65 CXX="g++-uc" \
66 LIBS="-nodefaultlibs -luClibc++ $(LIBGCC_S) -lc"
67
68 ifeq ($(BUILD_VARIANT),ssl)
69 CONFIGURE_ARGS += \
70 --with-ssl="$(STAGING_DIR)/usr"
71 endif
72
73 ifeq ($(BUILD_VARIANT),nossl)
74 CONFIGURE_ARGS += \
75 --with-ssl=no
76 endif
77
78 define Build/Configure
79 (cd $(PKG_BUILD_DIR); touch \
80 configure.ac \
81 aclocal.m4 \
82 Makefile.in \
83 config.h.in \
84 configure \
85 );
86 $(call Build/Configure/Default)
87 endef
88
89 define Package/ctorrent-svn/install
90 $(INSTALL_DIR) $(1)/usr/bin
91 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ctorrent $(1)/usr/bin/ctorrent
92 endef
93
94 Package/ctorrent-svn-nossl/install = $(Package/ctorrent-svn/install)
95
96 $(eval $(call BuildPackage,ctorrent-svn))
97 $(eval $(call BuildPackage,ctorrent-svn-nossl))