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.

53 lines
1.5 KiB

  1. # This Makefile is free software, SPDX codes: GPL-2.0-or-later OR MIT
  2. include $(TOPDIR)/rules.mk
  3. PKG_NAME:=cJSON
  4. PKG_VERSION:=1.7.14
  5. PKG_RELEASE:=1
  6. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  7. PKG_SOURCE_URL:=https://codeload.github.com/DaveGamble/cJSON/tar.gz/v$(PKG_VERSION)?
  8. PKG_HASH:=fb50a663eefdc76bafa80c82bc045af13b1363e8f45cec8b442007aef6a41343
  9. PKG_LICENSE:=MIT
  10. PKG_LICENSE_FILES:=LICENSE
  11. PKG_CPE_ID:=cpe:/a:cjson_project:cjson
  12. CMAKE_INSTALL:=1
  13. PKG_BUILD_PARALLEL:=1
  14. include $(INCLUDE_DIR)/package.mk
  15. include $(INCLUDE_DIR)/cmake.mk
  16. define Package/cJSON
  17. SECTION:=libs
  18. CATEGORY:=Libraries
  19. TITLE:=Ultralightweight JSON parser in ANSI C
  20. URL:=https://github.com/DaveGamble/cJSON
  21. MAINTAINER:=Karl Palsson <karlp@etactica.com>
  22. endef
  23. define Package/cJSON/description
  24. Ultralightweight JSON parser in ANSI C.
  25. cJSON aims to be the dumbest possible parser that you can get your
  26. job done with. It's a single file of C, and a single header file.
  27. endef
  28. CMAKE_OPTIONS += -DENABLE_CJSON_TEST=OFF
  29. define Build/InstallDev
  30. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  31. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcjson.pc $(1)/usr/lib/pkgconfig
  32. $(INSTALL_DIR) $(1)/usr/include
  33. $(CP) $(PKG_INSTALL_DIR)/usr/include/cjson/cJSON.h $(1)/usr/include/
  34. $(INSTALL_DIR) $(1)/usr/lib
  35. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcjson.so* $(1)/usr/lib/
  36. endef
  37. define Package/cJSON/install
  38. $(INSTALL_DIR) $(1)/usr/lib
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcjson.so* $(1)/usr/lib/
  40. endef
  41. $(eval $(call BuildPackage,cJSON))