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.

94 lines
2.8 KiB

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