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.

51 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.15
  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:=5308fd4bd90cef7aa060558514de6a1a4a0819974a26e6ed13973c5f624c24b2
  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. include $(INCLUDE_DIR)/package.mk
  14. include $(INCLUDE_DIR)/cmake.mk
  15. define Package/cJSON
  16. SECTION:=libs
  17. CATEGORY:=Libraries
  18. TITLE:=Ultralightweight JSON parser in ANSI C
  19. URL:=https://github.com/DaveGamble/cJSON
  20. endef
  21. define Package/cJSON/description
  22. Ultralightweight JSON parser in ANSI C.
  23. cJSON aims to be the dumbest possible parser that you can get your
  24. job done with. It's a single file of C, and a single header file.
  25. endef
  26. CMAKE_OPTIONS += -DENABLE_CJSON_TEST=OFF
  27. define Build/InstallDev
  28. $(INSTALL_DIR) $(1)/usr/include/cjson
  29. $(CP) $(PKG_INSTALL_DIR)/usr/include/cjson/cJSON.h $(1)/usr/include/cjson
  30. $(INSTALL_DIR) $(1)/usr/lib
  31. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcjson.so* $(1)/usr/lib/
  32. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  33. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcjson.pc $(1)/usr/lib/pkgconfig
  34. $(SED) 's,/usr,$(STAGING_DIR)/usr,g' $(1)/usr/lib/pkgconfig/libcjson.pc
  35. endef
  36. define Package/cJSON/install
  37. $(INSTALL_DIR) $(1)/usr/lib
  38. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcjson.so* $(1)/usr/lib/
  39. endef
  40. $(eval $(call BuildPackage,cJSON))