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.

81 lines
2.7 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:=$(AUTORELEASE)
  7. PKG_SOURCE_PROTO:=git
  8. PKG_SOURCE_URL:=https://github.com/vasild/cpp-ipfs-http-client.git
  9. PKG_SOURCE_DATE:=2021-03-01
  10. PKG_SOURCE_VERSION:=27f6439303f7afb5b8b2e4154f4269ba296059c7
  11. PKG_MIRROR_HASH:=61814d666bbd927750a0af7d350ad8ba27c2a78e0b5f5196ec4e0b5049ef2690
  12. PKG_MAINTAINER:=Leonid Esman <leonid.esman@gmail.com>
  13. PKG_LICENSE:=MIT
  14. PKG_LICENSE_FILES:=LICENSE.MIT
  15. PKG_BUILD_DEPENDS:=nlohmannjson
  16. include $(INCLUDE_DIR)/package.mk
  17. include ../../devel/ninja/ninja-cmake.mk
  18. define Package/ipfs-http-client/Default/description
  19. IPFS (the InterPlanetary File System) is the Distributed Web.
  20. Specs, docs, sources, links: https://ipfs.io/ and https://github.com/ipfs.
  21. This is Vasil Dimov's C++ IPFS HTTP API client library.
  22. endef
  23. define Package/libipfs-http-client
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=IPFS client library
  27. URL:=https://github.com/vasild/cpp-ipfs-http-client
  28. DEPENDS:= +libcurl +libstdcpp +libatomic
  29. endef
  30. define Package/libipfs-http-client/description
  31. $(call Package/ipfs-http-client/Default/description)
  32. This package contains shared library.
  33. endef
  34. define Package/ipfs-http-client-tests
  35. SECTION:=utils
  36. CATEGORY:=Utilities
  37. TITLE:=IPFS client library tests
  38. URL:=https://github.com/vasild/cpp-ipfs-http-client
  39. DEPENDS:=+libipfs-http-client +libcurl
  40. endef
  41. define Package/ipfs-http-client-tests/description
  42. $(call Package/ipfs-http-client/Default/description)
  43. This package contains library tests.
  44. endef
  45. CMAKE_OPTIONS += \
  46. -DBUILD_SHARED_LIBS=ON \
  47. -DBUILD_TESTING=ON
  48. define Package/libipfs-http-client/install
  49. $(INSTALL_DIR) $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipfs-http-client.so* $(1)/usr/lib
  51. endef
  52. define Package/ipfs-http-client-tests/install
  53. $(INSTALL_DIR) $(1)/usr/bin
  54. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_block $(1)/usr/bin/ipfs-block
  55. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_config $(1)/usr/bin/ipfs-config
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_dht $(1)/usr/bin/ipfs-dht
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_files $(1)/usr/bin/ipfs-files
  58. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_generic $(1)/usr/bin/ipfs-generic
  59. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_key $(1)/usr/bin/ipfs-key
  60. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_name $(1)/usr/bin/ipfs-name
  61. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_object $(1)/usr/bin/ipfs-object
  62. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_pin $(1)/usr/bin/ipfs-pin
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/test_swarm $(1)/usr/bin/ipfs-swarm
  64. endef
  65. $(eval $(call BuildPackage,libipfs-http-client))
  66. $(eval $(call BuildPackage,ipfs-http-client-tests))