[packages] rtorrent: update to git head and add 2 distinct rtorrent versions:
[packages.git] / net / rtorrent / Makefile
1 #
2 # Copyright (C) 2007-2013 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:=rtorrent
11 PKG_VERSION:=0.9.3-git
12 PKG_RELEASE:=$(PKG_SOURCE_VERSION)-1
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=https://github.com/rakshasa/rtorrent.git
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE_VERSION:=82a68420f4d90098e00cc92f082f10a8079e9800
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
19
20 PKG_FIXUP:=autoreconf
21 PKG_BUILD_PARALLEL:=1
22 PKG_INSTALL:=1
23
24 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/rtorrent/Default
29   SUBMENU:=BitTorrent
30   SECTION:=net
31   CATEGORY:=Network
32   TITLE:=BitTorrent client for ncurses
33   URL:=http://libtorrent.rakshasa.no/
34   DEPENDS:=+libcurl +libtorrent +libncursesw +libsigcxx +libpthread
35 endef
36
37 define Package/rtorrent/Default/description
38  rTorrent is a BitTorrent client for ncurses, using the libtorrent library.
39  The client and library is written in C++ with emphasis on speed and
40  efficiency, while delivering equivalent features to those found in GUI based
41  clients in an ncurses client.
42 endef
43
44 define Package/rtorrent
45 $(call Package/rtorrent/Default)
46   VARIANT:=norpc
47 endef
48
49 define Package/rtorrent/description
50 $(call Package/rtorrent/Default/description)
51  This package is built without xmlrpc support
52 endef
53
54 define Package/rtorrent-rpc
55 $(call Package/rtorrent/Default)
56   VARIANT:=rpc
57   DEPENDS+=+xmlrpc-c-server
58   TITLE+=(with rpc support)
59 endef
60
61 define Package/rtorrent-rpc/description
62 $(call Package/rtorrent/Default/description)
63  This package is built with xmlrpc support
64 endef
65
66 TARGET_LDFLAGS += -lpthread -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
67
68 CONFIGURE_ARGS+= \
69         --enable-shared \
70         --disable-static \
71         --disable-debug
72
73 ifeq ($(BUILD_VARIANT),rpc)
74         CONFIGURE_ARGS += \
75                 --with-xmlrpc-c
76 endif
77
78
79 define Build/Configure
80         ( cd $(PKG_BUILD_DIR); ./autogen.sh );
81         $(call Build/Configure/Default)
82 endef
83
84 define Package/rtorrent/install
85         $(INSTALL_DIR) $(1)/usr/bin
86         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rtorrent $(1)/usr/bin/
87 endef
88
89 Package/rtorrent-rpc/install = $(Package/rtorrent/install)
90
91 $(eval $(call BuildPackage,rtorrent))
92 $(eval $(call BuildPackage,rtorrent-rpc))