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.

73 lines
2.1 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:=1
  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_DEPENDS:=nlohmannjson
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/ipfs-http-client/Default/description
  18. IPFS (the InterPlanetary File System) is the Distributed Web.
  19. Specs, docs, sources, links: https://ipfs.io/ and https://github.com/ipfs.
  20. This is Vasil Dimov's C++ IPFS HTTP API client library.
  21. endef
  22. define Package/libipfs-http-client
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=IPFS client library
  26. URL:=https://github.com/vasild/cpp-ipfs-http-client
  27. DEPENDS:= +libcurl +libstdcpp
  28. endef
  29. define Package/libipfs-http-client/description
  30. $(call Package/ipfs-http-client/Default/description)
  31. This package contains shared library.
  32. endef
  33. define Package/ipfs-http-client-tests
  34. SECTION:=utils
  35. CATEGORY:=Utilities
  36. TITLE:=IPFS client library tests
  37. URL:=https://github.com/vasild/cpp-ipfs-http-client
  38. DEPENDS:=+libipfs-http-client +libcurl
  39. endef
  40. define Package/ipfs-http-client-tests/description
  41. $(call Package/ipfs-http-client/Default/description)
  42. This package contains library tests.
  43. endef
  44. define Build/InstallDev
  45. $(INSTALL_DIR) $(1)/usr/include
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include
  48. $(CP) $(PKG_BUILD_DIR)/libipfs-http-client.a $(1)/usr/lib
  49. endef
  50. define Package/libipfs-http-client/install
  51. $(INSTALL_DIR) $(1)/usr/lib
  52. $(CP) $(PKG_BUILD_DIR)/libipfs-http-client.so* $(1)/usr/lib
  53. endef
  54. define Package/ipfs-http-client-tests/install
  55. $(INSTALL_DIR) $(1)/usr/bin
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/test/ipfs-* $(1)/usr/bin
  57. endef
  58. $(eval $(call BuildPackage,libipfs-http-client))
  59. $(eval $(call BuildPackage,ipfs-http-client-tests))