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.

91 lines
2.8 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=libtorrent-rasterbar
  3. PKG_VERSION:=2.0.7
  4. PKG_RELEASE:=$(AUTORELEASE)
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/arvidn/libtorrent/tar.gz/v$(PKG_VERSION)?
  7. PKG_HASH:=1c8209fdf765be7bc989e9cbd1d9dc3d5a6a57cb979205e73e925c9c72ebe8ce
  8. PKG_MAINTAINER:=David Yang <mmyangfl@gmail.com>
  9. PKG_LICENSE:=BSD-3-Clause
  10. PKG_LICENSE_FILES:=COPYING
  11. include $(INCLUDE_DIR)/package.mk
  12. include $(INCLUDE_DIR)/cmake.mk
  13. define Package/libtorrent-rasterbar/Default
  14. TITLE:=Rasterbar BitTorrent library
  15. URL:=https://libtorrent.org/
  16. endef
  17. define Package/libtorrent-rasterbar
  18. $(call Package/libtorrent-rasterbar/Default)
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. DEPENDS:=+boost-system +libopenssl +libatomic +libstdcpp
  22. endef
  23. #define Package/python3-libtorrent
  24. # $(call Package/libtorrent-rasterbar/Default)
  25. # SECTION:=lang
  26. # CATEGORY:=Languages
  27. # SUBMENU:=Python
  28. # TITLE+= (Python 3)
  29. # DEPENDS:=+libtorrent-rasterbar +boost-python
  30. #endef
  31. define Package/libtorrent-rasterbar/description
  32. Rasterbar libtorrent is a C++ library that aims to be a good alternative to
  33. all the other bittorrent implementations around.
  34. endef
  35. #define Package/python3-libtorrent/description
  36. # $(call Package/libtorrent-rasterbar/description)
  37. # This package contains Python 3 bindings for the libtorrent-rasterbar library.
  38. #endef
  39. define Download/try_signal
  40. VERSION:=751a7e5a5be14892bcfdff1e63c653bcbf71cf39
  41. SUBDIR:=deps/try_signal
  42. FILE:=$(PKG_NAME)-try_signal-$$(VERSION).tar.xz
  43. URL:=https://github.com/arvidn/try_signal.git
  44. MIRROR_HASH:=32a432e35e81c79f21c49744f00696c112e0deab45d15d91c61ceb63fe25a5f8
  45. PROTO:=git
  46. endef
  47. $(eval $(call Download,try_signal))
  48. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  49. define Build/Prepare
  50. $(Build/Prepare/Default)
  51. $(eval $(Download/try_signal))
  52. xzcat $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
  53. endef
  54. #CMAKE_OPTIONS += \
  55. # -Dpython-bindings=ON \
  56. # -Dpython-egg-info=ON
  57. define Build/InstallDev
  58. $(INSTALL_DIR) $(1)/usr/include
  59. $(CP) $(PKG_INSTALL_DIR)/usr/include/libtorrent $(1)/usr/include/
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent-rasterbar.so* $(1)/usr/lib/
  62. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent-rasterbar.pc $(1)/usr/lib/pkgconfig/
  64. endef
  65. define Package/libtorrent-rasterbar/install
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent-rasterbar.so.* $(1)/usr/lib/
  68. endef
  69. #define Package/python3-libtorrent/install
  70. # $(INSTALL_DIR) $(1)/usr/lib/python2.7/site-packages
  71. # $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/*.so* $(1)/usr/lib/python2.7/site-packages/
  72. #endef
  73. $(eval $(call BuildPackage,libtorrent-rasterbar))
  74. #$(eval $(call BuildPackage,python3-libtorrent))