1 include $(TOPDIR)/rules.mk
7 PKG_SOURCE_URL=$(LEDE_GIT)/project/libubox.git
8 PKG_SOURCE_DATE:=2017-06-17
9 PKG_SOURCE_VERSION:=fd57eea9f37e447814afbf934db626288aac23c4
10 PKG_MIRROR_HASH:=6921c507c0c7a951a47d619caa8228f7553141484a3c6d87ba526216f9dd927e
16 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
18 PKG_BUILD_DEPENDS:=lua
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/host-build.mk
22 include $(INCLUDE_DIR)/cmake.mk
24 define Package/libubox
27 TITLE:=Basic utility library
28 ABI_VERSION:=$(PKG_VERSION)
32 define Package/libblobmsg-json
35 TITLE:=blobmsg <-> json conversion library
36 DEPENDS:=+libjson-c +libubox
42 DEPENDS:=+libjson-c +libubox +libblobmsg-json
43 TITLE:=JSON SHell Notation
46 define Package/jshn/description
47 Library for parsing and generating JSON from shell scripts
50 define Package/libjson-script
54 TITLE:=Minimalistic JSON based scripting engine
57 define Package/libubox-lua
60 DEPENDS:=+libubox +liblua
61 TITLE:=Lua binding for the OpenWrt Basic utility library
64 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
66 -DLUAPATH=/usr/lib/lua
68 define Package/libubox/install
69 $(INSTALL_DIR) $(1)/lib/
70 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so $(1)/lib/
73 define Package/libblobmsg-json/install
74 $(INSTALL_DIR) $(1)/lib/
75 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so $(1)/lib/
78 define Package/jshn/install
79 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/libubox
80 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jshn $(1)/usr/bin
81 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libubox/jshn.sh $(1)/usr/share/libubox
84 define Package/libjson-script/install
85 $(INSTALL_DIR) $(1)/lib/
86 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so $(1)/lib/
89 define Package/libubox-lua/install
90 $(INSTALL_DIR) $(1)/usr/lib/lua
91 $(CP) $(PKG_BUILD_DIR)/lua/uloop.so $(1)/usr/lib/lua/
95 CMAKE_HOST_OPTIONS += \
97 -DBUILD_EXAMPLES=OFF \
99 $(eval $(call BuildPackage,libubox))
100 $(eval $(call BuildPackage,libblobmsg-json))
101 $(eval $(call BuildPackage,jshn))
102 $(eval $(call BuildPackage,libjson-script))
103 $(eval $(call BuildPackage,libubox-lua))
104 $(eval $(call HostBuild))