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