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