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
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/libtorrent
28 TITLE
:=Rakshasa
's BitTorrent library
29 URL:=http://libtorrent.rakshasa.no/
33 define Package/libtorrent/description
34 LibTorrent is a BitTorrent library written in C++ for *nix, with a focus
35 on high performance and good code. The library differentiates itself from
36 other implementations by transfering directly from file pages to the
37 network stack. On high-bandwidth connections it is able to seed at 3 times
38 the speed of the official client.
50 CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
52 define Build/Configure
53 $(call Build/Configure/Default,)
54 $(SED) 's|^sys_lib_dlsearch_path_spec
=.
*|sys_lib_dlsearch_path_spec
="$(STAGING_DIR)/usr/lib"|g
' \
55 $(PKG_BUILD_DIR)/libtool
56 $(SED) 's|^postdeps
=.
*|postdeps
=|g
' $(PKG_BUILD_DIR)/libtool
60 $(MAKE) -C $(PKG_BUILD_DIR) all
61 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
62 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
65 define Build/InstallDev
66 mkdir -p $(1)/usr/include
67 $(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/
69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/
70 mkdir -p $(1)/usr/lib/pkgconfig
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/
72 $(SED) 's
,$(TARGET_LDFLAGS
),,g
' $(1)/usr/lib/pkgconfig/libtorrent.pc
75 define Package/libtorrent/install
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/
80 $(eval $(call BuildPackage,libtorrent))