2 # Copyright (C) 2007-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://libtorrent.rakshasa.no/downloads/
17 PKG_MD5SUM:=8974dc9499b382a09fb952cabcfef9a0
21 include $(INCLUDE_DIR)/package.mk
23 define Package/libtorrent
26 TITLE:=Rakshasa's BitTorrent library
27 URL:=http://libtorrent.rakshasa.no/
28 DEPENDS:=+libopenssl +libsigcxx
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.
39 TARGET_CFLAGS += $(FPIC)
41 # XXX: rtorrent needs encryption (--enable-openssl)
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
55 define Build/InstallDev
56 $(INSTALL_DIR) $(1)/usr/include
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/
60 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/
64 define Package/libtorrent/install
65 $(INSTALL_DIR) $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/
69 $(eval $(call BuildPackage,libtorrent))