libs: add cJSON
New package, new dependency of mosquitto v2.0 Signed-off-by: Karl Palsson <karlp@etactica.com>
This commit is contained in:
parent
465774e9b5
commit
2973f85310
1 changed files with 53 additions and 0 deletions
53
libs/cjson/Makefile
Normal file
53
libs/cjson/Makefile
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# This Makefile is free software, SPDX codes: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=cJSON
|
||||||
|
PKG_VERSION:=1.7.14
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeload.github.com/DaveGamble/cJSON/tar.gz/v$(PKG_VERSION)?
|
||||||
|
PKG_HASH:=fb50a663eefdc76bafa80c82bc045af13b1363e8f45cec8b442007aef6a41343
|
||||||
|
|
||||||
|
PKG_LICENSE:=MIT
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
PKG_CPE_ID:=cpe:/a:cjson_project:cjson
|
||||||
|
|
||||||
|
CMAKE_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
||||||
|
define Package/cJSON
|
||||||
|
SECTION:=libs
|
||||||
|
CATEGORY:=Libraries
|
||||||
|
TITLE:=Ultralightweight JSON parser in ANSI C
|
||||||
|
URL:=https://github.com/DaveGamble/cJSON
|
||||||
|
MAINTAINER:=Karl Palsson <karlp@etactica.com>
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cJSON/description
|
||||||
|
Ultralightweight JSON parser in ANSI C.
|
||||||
|
cJSON aims to be the dumbest possible parser that you can get your
|
||||||
|
job done with. It's a single file of C, and a single header file.
|
||||||
|
endef
|
||||||
|
|
||||||
|
CMAKE_OPTIONS += -DENABLE_CJSON_TEST=OFF
|
||||||
|
|
||||||
|
define Build/InstallDev
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libcjson.pc $(1)/usr/lib/pkgconfig
|
||||||
|
$(INSTALL_DIR) $(1)/usr/include
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/cjson/cJSON.h $(1)/usr/include/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcjson.so* $(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cJSON/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcjson.so* $(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cJSON))
|
Loading…
Reference in a new issue