Merge pull request #96 from medaved/master
[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:=$(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:=6a3234eaa79f15857260df31f98711ef24266191
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 MAINTAINER:=Peter Wagner <tripolar@gmx.at>
36 endef
37
38 define Package/rtorrent/Default/description
39 rTorrent is a BitTorrent client for ncurses, using the libtorrent library.
40 The client and library is written in C++ with emphasis on speed and
41 efficiency, while delivering equivalent features to those found in GUI based
42 clients in an ncurses client.
43 endef
44
45 define Package/rtorrent
46 $(call Package/rtorrent/Default)
47 VARIANT:=norpc
48 endef
49
50 define Package/rtorrent/description
51 $(call Package/rtorrent/Default/description)
52 This package is built without xmlrpc support
53 endef
54
55 define Package/rtorrent-rpc
56 $(call Package/rtorrent/Default)
57 VARIANT:=rpc
58 DEPENDS+=+xmlrpc-c-server
59 TITLE+=(with rpc support)
60 endef
61
62 define Package/rtorrent-rpc/description
63 $(call Package/rtorrent/Default/description)
64 This package is built with xmlrpc support
65 endef
66
67 TARGET_LDFLAGS += -lz -lpthread -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
68
69 CONFIGURE_ARGS+= \
70 --enable-shared \
71 --disable-static \
72 --disable-debug
73
74 ifeq ($(BUILD_VARIANT),rpc)
75 CONFIGURE_ARGS += \
76 --with-xmlrpc-c
77 endif
78
79
80 define Build/Configure
81 ( cd $(PKG_BUILD_DIR); ./autogen.sh );
82 $(call Build/Configure/Default)
83 endef
84
85 define Package/rtorrent/install
86 $(INSTALL_DIR) $(1)/usr/bin
87 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rtorrent $(1)/usr/bin/
88 endef
89
90 Package/rtorrent-rpc/install = $(Package/rtorrent/install)
91
92 $(eval $(call BuildPackage,rtorrent))
93 #$(eval $(call BuildPackage,rtorrent-rpc))