42c0ee1ab81ec49aac6e77d2a0a924270df6903f
[packages.git] / libs / libtorrent / Makefile
1 #
2 # Copyright (C) 2007-2011 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:=libtorrent
11 PKG_VERSION:=0.12.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://libtorrent.rakshasa.no/downloads
16 PKG_MD5SUM:=037499ed708aaf72988cee60e5a8d96b
17
18 PKG_FIXUP:=autoreconf
19 PKG_BUILD_PARALLEL:=1
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libtorrent
25   SECTION:=libs
26   CATEGORY:=Libraries
27   TITLE:=Rakshasa's BitTorrent library
28   URL:=http://libtorrent.rakshasa.no/
29   DEPENDS:=+libopenssl +libsigcxx
30   MAINTAINER:=Luka Perkov <openwrt@lukaperkov.net>
31 endef
32
33 define Package/libtorrent/description
34  LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on
35  high performance and good code. The library differentiates itself from other
36  implementations by transfering directly from file pages to the network stack.
37  On high-bandwidth connections it is able to seed at 3 times the speed of the
38  official client.
39 endef
40
41 TARGET_CPPFLAGS += -fno-strict-aliasing -fno-inline
42 TARGET_LDFLAGS += $(LIBGCC_S)
43
44 CONFIGURE_ARGS+= \
45         --enable-shared \
46         --enable-static \
47         --enable-aligned \
48         --disable-debug \
49         --enable-openssl \
50
51 define Build/Configure
52         ( cd $(PKG_BUILD_DIR); ./autogen.sh );
53         $(call Build/Configure/Default)
54 endef
55
56 define Build/InstallDev
57         $(INSTALL_DIR) $(1)/usr/include
58         $(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/
59         $(INSTALL_DIR) $(1)/usr/lib
60         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/
61         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
62         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/
63 endef
64
65 define Package/libtorrent/install
66         $(INSTALL_DIR) $(1)/usr/lib
67         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,libtorrent))