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.

60 lines
1.7 KiB

  1. #
  2. # Copyright (C) 2019 Daniel Engberg <daniel.engberg.lists@pyret.net>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=jsoncpp
  9. PKG_VERSION:=1.8.4
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=
  12. PKG_LICENSE:=MIT
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  16. PKG_HASH:=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/jsoncpp
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=jsoncpp
  23. URL:=https://github.com/open-source-parsers/jsoncpp
  24. DEPENDS:=+libstdcpp
  25. endef
  26. define Package/jsoncpp/description
  27. JsonCpp is a C++ library that allows manipulating
  28. JSON values, including serialization and
  29. deserialization to and from strings. It can also
  30. preserve existing comment in
  31. unserialization/serialization steps, making it a
  32. convenient format to store user input files.
  33. endef
  34. CMAKE_OPTIONS += \
  35. -DBUILD_SHARED_LIBS:BOOL=ON \
  36. -DBUILD_STATIC_LIBS:BOOL=OFF \
  37. -DJSONCPP_WITH_TESTS:BOOL=OFF
  38. define Package/jsoncpp/install
  39. $(INSTALL_DIR) $(1)/usr/lib/
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
  41. endef
  42. define Build/InstallDev
  43. $(INSTALL_DIR) $(1)/usr/include
  44. $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include
  45. $(INSTALL_DIR) $(1)/usr/lib/
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
  47. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/jsoncpp.pc $(1)/usr/lib/pkgconfig/
  49. endef
  50. $(eval $(call BuildPackage,jsoncpp))