5de0323026a3962a3918778f10287e4419ad6adf
[openwrt/svn-archive/archive.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 PKG_VERSION:=0.11.9
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://libtorrent.rakshasa.no/downloads/
17 PKG_MD5SUM:=8974dc9499b382a09fb952cabcfef9a0
18
19 PKG_FIXUP = libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libtorrent
24 SECTION:=libs
25 CATEGORY:=Libraries
26 TITLE:=Rakshasa's BitTorrent library
27 URL:=http://libtorrent.rakshasa.no/
28 DEPENDS:=+libopenssl +libsigcxx
29 endef
30
31 define Package/libtorrent/description
32 LibTorrent is a BitTorrent library written in C++ for *nix, with a focus
33 on high performance and good code. The library differentiates itself from
34 other implementations by transfering directly from file pages to the
35 network stack. On high-bandwidth connections it is able to seed at 3 times
36 the speed of the official client.
37 endef
38
39 # XXX: rtorrent needs encryption (--enable-openssl)
40 CONFIGURE_ARGS+= \
41 --enable-shared \
42 --enable-static \
43 --enable-aligned \
44 --disable-debug \
45 --enable-openssl \
46
47 CONFIGURE_VARS += \
48 CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
49
50 define Build/Compile
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 DESTDIR="$(PKG_INSTALL_DIR)" \
53 all install
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))
71