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:=3
  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_MAINTAINER:=Karl Palsson <karlp@etactica.com>
  10. PKG_LICENSE:=MIT
  11. PKG_LICENSE_FILES:=LICENSE
  12. PKG_CPE_ID:=cpe:/a:cjson_project:cjson
  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. endef
  22. define Package/cJSON/description
  23. Ultralightweight JSON parser in ANSI C.
  24. cJSON aims to be the dumbest possible parser that you can get your
  25. job done with. It's a single file of C, and a single header file.
  26. endef
  27. CMAKE_OPTIONS += -DENABLE_CJSON_TEST=OFF
  28. define Build/InstallDev
  29. $(INSTALL_DIR) $(1)/usr/include/cjson
  30. $(CP) $(PKG_INSTALL_DIR)/usr/include/cjson/cJSON.h $(1)/usr/include/cjson
  31. $(INSTALL_DIR) $(1)/usr/lib
  32. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcjson.so* $(1)/usr/lib/
  33. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  34. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcjson.pc $(1)/usr/lib/pkgconfig
  35. $(SED) 's,/usr,$(STAGING_DIR)/usr,g' $(1)/usr/lib/pkgconfig/libcjson.pc
  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))