You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2007-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libtorrent
  9. PKG_VERSION:=0.13.7
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://codeload.github.com/rakshasa/libtorrent/tar.gz/v$(PKG_VERSION)?
  12. PKG_HASH:=86b4b1753385aaddf9e59ad94f1292eee5102139eb57520e84d1af2f04693708
  13. PKG_FIXUP:=autoreconf
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/libtorrent
  18. SECTION:=libs
  19. CATEGORY:=Libraries
  20. TITLE:=Rakshasa's BitTorrent library
  21. URL:=https://rakshasa.github.io/rtorrent/
  22. DEPENDS:=+libopenssl +libsigcxx +zlib
  23. MAINTAINER:=Rosen Penev <rosenp@gmail.com>
  24. endef
  25. define Package/libtorrent/description
  26. LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on
  27. high performance and good code. The library differentiates itself from other
  28. implementations by transferring directly from file pages to the network stack.
  29. On high-bandwidth connections it is able to seed at 3 times the speed of the
  30. official client.
  31. endef
  32. TARGET_LDFLAGS += $(LIBGCC_S)
  33. CONFIGURE_ARGS+= \
  34. --enable-shared \
  35. --enable-static \
  36. --enable-aligned \
  37. --disable-debug \
  38. --enable-openssl \
  39. --disable-instrumentation \
  40. --with-zlib=$(STAGING_DIR)/usr \
  41. --disable-ipv6
  42. define Build/InstallDev
  43. $(INSTALL_DIR) $(1)/usr/include
  44. $(CP) $(PKG_INSTALL_DIR)/usr/include/torrent $(1)/usr/include/
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.{a,so*} $(1)/usr/lib/
  47. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent.pc $(1)/usr/lib/pkgconfig/
  49. endef
  50. define Package/libtorrent/install
  51. $(INSTALL_DIR) $(1)/usr/lib
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent.so.* $(1)/usr/lib/
  53. endef
  54. $(eval $(call BuildPackage,libtorrent))