2 # Copyright (C) 2007 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
:=86cdfca2d1c3cfb3b6b316d9beaa25e0
19 PKG_BUILD_DEPENDS
:=libtool
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/libtorrent
26 TITLE
:=Rakshasa
's BitTorrent library
27 URL:=http://libtorrent.rakshasa.no/
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.
48 CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
50 define Build/Configure
51 $(call Build/Configure/Default,)
52 $(call libtool_disable_rpath)
53 $(SED) 's|^sys_lib_dlsearch_path_spec
=.
*|sys_lib_dlsearch_path_spec
="$(STAGING_DIR)/usr/lib"|g
' \
54 $(PKG_BUILD_DIR)/libtool
55 $(SED) 's|^postdeps
=.
*|postdeps
=|g
' $(PKG_BUILD_DIR)/libtool
59 $(MAKE) -C $(PKG_BUILD_DIR) all
60 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
61 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
64 define Build/InstallDev
65 mkdir -p $(1)/usr/include
66 $(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/
69 mkdir -p $(1)/usr/lib/pkgconfig
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/
71 $(SED) 's
,$(TARGET_LDFLAGS
),,g
' $(1)/usr/lib/pkgconfig/libtorrent.pc
74 define Build/UninstallDev
75 rm -rf $(STAGING_DIR)/usr/include/torrent \
76 $(STAGING_DIR)/usr/lib/libtorrent.{a,so*} \
77 $(STAGING_DIR)/usr/lib/pkgconfig/libtorrent.pc
80 define Package/libtorrent/install
81 $(INSTALL_DIR) $(1)/usr/lib
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/
85 $(eval $(call BuildPackage,libtorrent))