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.

82 lines
2.6 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. #
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=ipfs-http-client
  6. PKG_RELEASE:=3
  7. PKG_MAINTAINER:=Leonid Esman <leonid.esman@gmail.com>
  8. PKG_LICENSE:=MIT
  9. PKG_LICENSE_FILES:=LICENSE.MIT
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/vasild/cpp-ipfs-http-client.git
  12. PKG_SOURCE_DATE:=2019-11-05
  13. PKG_SOURCE_VERSION:=763e59ad698f3e3846f85df11e01c18ef3fbc401
  14. PKG_MIRROR_HASH:=a2b5721faf0d43ddb4a892245ef382666149c83f3f97e558e1a6acf2402fb9fd
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_BUILD_DEPENDS:=nlohmannjson
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/ipfs-http-client/Default/description
  20. IPFS (the InterPlanetary File System) is the Distributed Web.
  21. Specs, docs, sources, links: https://ipfs.io/ and https://github.com/ipfs.
  22. This is Vasil Dimov's C++ IPFS HTTP API client library.
  23. endef
  24. define Package/libipfs-http-client
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=IPFS client library
  28. URL:=https://github.com/vasild/cpp-ipfs-http-client
  29. DEPENDS:= +libcurl +libstdcpp +libatomic
  30. endef
  31. define Package/libipfs-http-client/description
  32. $(call Package/ipfs-http-client/Default/description)
  33. This package contains shared library.
  34. endef
  35. define Package/ipfs-http-client-tests
  36. SECTION:=utils
  37. CATEGORY:=Utilities
  38. TITLE:=IPFS client library tests
  39. URL:=https://github.com/vasild/cpp-ipfs-http-client
  40. DEPENDS:=+libipfs-http-client +libcurl
  41. endef
  42. define Package/ipfs-http-client-tests/description
  43. $(call Package/ipfs-http-client/Default/description)
  44. This package contains library tests.
  45. endef
  46. CMAKE_OPTIONS += \
  47. -DBUILD_SHARED_LIBS=ON \
  48. -DBUILD_TESTING=ON
  49. define Package/libipfs-http-client/install
  50. $(INSTALL_DIR) $(1)/usr/lib
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipfs-http-client.so* $(1)/usr/lib
  52. endef
  53. define Package/ipfs-http-client-tests/install
  54. $(INSTALL_DIR) $(1)/usr/bin
  55. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/block $(1)/usr/bin/ipfs-block
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/config $(1)/usr/bin/ipfs-config
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/dht $(1)/usr/bin/ipfs-dht
  58. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/files $(1)/usr/bin/ipfs-files
  59. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/generic $(1)/usr/bin/ipfs-generic
  60. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/key $(1)/usr/bin/ipfs-key
  61. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/name $(1)/usr/bin/ipfs-name
  62. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/object $(1)/usr/bin/ipfs-object
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/pin $(1)/usr/bin/ipfs-pin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/swarm $(1)/usr/bin/ipfs-swarm
  65. endef
  66. $(eval $(call BuildPackage,libipfs-http-client))
  67. $(eval $(call BuildPackage,ipfs-http-client-tests))