[package] update to librtorrent to 0.12.4-svn1087
[packages.git] / libs / libtorrent / 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$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libtorrent
12
13 PKG_REV:=1087
14 PKG_VERSION:=0.12.4_r$(PKG_REV)
15 PKG_RELEASE:=3
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=svn://rakshasa.no/libtorrent/trunk/libtorrent
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/libtorrent
27   SECTION:=libs
28   CATEGORY:=Libraries
29   TITLE:=Rakshasa's BitTorrent library
30   URL:=http://libtorrent.rakshasa.no/
31   DEPENDS:=+libopenssl +libsigcxx
32 endef
33
34 define Package/libtorrent/description
35  LibTorrent is a BitTorrent library written in C++ for *nix, with a focus 
36  on high performance and good code. The library differentiates itself from 
37  other implementations by transfering directly from file pages to the 
38  network stack. On high-bandwidth connections it is able to seed at 3 times 
39  the speed of the official client.
40 endef
41
42 TARGET_CFLAGS += $(FPIC)
43
44 TARGET_CPPFLAGS +=  \
45         -fno-strict-aliasing -fno-inline \
46
47 # XXX: rtorrent needs encryption (--enable-openssl)
48 CONFIGURE_ARGS+= \
49         --enable-shared \
50         --enable-static \
51         --enable-aligned \
52         --disable-debug \
53         --enable-openssl \
54
55 define Build/Configure
56         (cd $(PKG_BUILD_DIR); ./autogen.sh );
57         $(call Build/Configure/Default)
58 endef
59
60 define Build/Compile
61         $(MAKE) -C $(PKG_BUILD_DIR) \
62                 DESTDIR="$(PKG_INSTALL_DIR)" \
63                 all install
64 endef
65
66 define Build/InstallDev
67         $(INSTALL_DIR) $(1)/usr/include
68         $(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/
69         $(INSTALL_DIR) $(1)/usr/lib
70         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/
71         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
72         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/
73 endef
74
75 define Package/libtorrent/install
76         $(INSTALL_DIR) $(1)/usr/lib
77         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/
78 endef
79
80 $(eval $(call BuildPackage,libtorrent))
81