446caf41500e2dad24abc45c5c441960b9be418b
[packages.git] / net / rtorrent / Makefile
1 #
2 # Copyright (C) 2007-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 # $Id: Makefile 15090 2009-04-03 09:16:29Z florian $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=rtorrent
12
13 PKG_REV:=1093
14 PKG_VERSION:=0.8.4_r$(PKG_REV)
15 PKG_RELEASE:=5
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=svn://rakshasa.no/libtorrent/trunk/rtorrent
18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19 PKG_SOURCE_VERSION:=$(PKG_REV)
20 PKG_SOURCE_PROTO:=svn
21
22 PKG_FIXUP = libtool
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/rtorrent
27   SUBMENU:=BitTorrent
28   SECTION:=net
29   CATEGORY:=Network
30   TITLE:=BitTorrent client for ncurses
31   URL:=http://libtorrent.rakshasa.no/
32   DEPENDS:=+libcurl +libtorrent +libncurses +libsigcxx +xmlrpc-c
33 endef
34
35 define Package/rtorrent/description
36  rTorrent is a BitTorrent client for ncurses, using the libtorrent library.
37  The client and library are written in C++ with emphasis on speed and
38  efficiency, while delivering equivalent features to those found in GUI
39  based clients in an ncurses client.
40 endef
41
42 ifneq ($(CONFIG_GCC_VERSION_3_4)$(CONFIG_GCC_VERSION_4_1),)
43 TARGET_CPPFLAGS += -fno-strict-aliasing -fno-inline
44 endif
45
46 ifneq ($(CONFIG_GCC_VERSION_4_2)$(CONFIG_GCC_VERSION_4_3),)
47 TARGET_CPPFLAGS +=  -fno-inline
48 endif
49
50 CONFIGURE_ARGS+= \
51         --enable-shared \
52         --disable-static \
53         --disable-debug \
54         --disable-tls \
55         --with-xmlrpc-c \
56
57 define Build/Configure
58         (cd $(PKG_BUILD_DIR); ./autogen.sh );
59         $(call Build/Configure/Default)
60 endef
61
62 define Build/Compile
63         $(MAKE) -C $(PKG_BUILD_DIR) \
64                 DESTDIR="$(PKG_INSTALL_DIR)" \
65                 all install
66 endef
67
68 define Package/rtorrent/install
69         $(INSTALL_DIR) $(1)/usr/bin
70         $(CP) $(PKG_INSTALL_DIR)/usr/bin/rtorrent $(1)/usr/bin/
71 endef
72
73 $(eval $(call BuildPackage,rtorrent))