rpcd: iwinfo plugin fixes
[openwrt/svn-archive/archive.git] / package / libs / libubox / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=libubox
4 PKG_VERSION:=2016-02-26
5 PKG_RELEASE=$(PKG_SOURCE_VERSION)
6
7 PKG_SOURCE_PROTO:=git
8 PKG_SOURCE_URL=$(OPENWRT_GIT)/project/libubox.git
9 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
10 PKG_SOURCE_VERSION:=5326ce1046425154ab715387949728cfb09f4083
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
12 PKG_MIRROR_MD5SUM:=
13 CMAKE_INSTALL:=1
14
15 PKG_LICENSE:=ISC
16 PKG_LICENSE_FILES:=
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
19
20 PKG_BUILD_DEPENDS:=lua
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/cmake.mk
24
25 define Package/libubox
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Basic utility library
29 ABI_VERSION:=$(PKG_VERSION)
30 DEPENDS:=
31 endef
32
33 define Package/libblobmsg-json
34 SECTION:=libs
35 CATEGORY:=Libraries
36 TITLE:=blobmsg <-> json conversion library
37 DEPENDS:=+libjson-c +libubox
38 endef
39
40 define Package/jshn
41 SECTION:=utils
42 CATEGORY:=Utilities
43 DEPENDS:=+libjson-c +libubox +libblobmsg-json
44 TITLE:=JSON SHell Notation
45 endef
46
47 define Package/jshn/description
48 Library for parsing and generating JSON from shell scripts
49 endef
50
51 define Package/libjson-script
52 SECTION:=utils
53 CATEGORY:=Utilities
54 DEPENDS:=+libubox
55 TITLE:=Minimalistic JSON based scripting engine
56 endef
57
58 define Package/libubox-lua
59 SECTION:=libs
60 CATEGORY:=Libraries
61 DEPENDS:=+libubox +liblua
62 TITLE:=Lua binding for the OpenWrt Basic utility library
63 endef
64
65 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
66 CMAKE_OPTIONS = \
67 -DLUAPATH=/usr/lib/lua
68
69 define Package/libubox/install
70 $(INSTALL_DIR) $(1)/lib/
71 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so $(1)/lib/
72 endef
73
74 define Package/libblobmsg-json/install
75 $(INSTALL_DIR) $(1)/lib/
76 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so $(1)/lib/
77 endef
78
79 define Package/jshn/install
80 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/libubox
81 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jshn $(1)/usr/bin
82 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libubox/jshn.sh $(1)/usr/share/libubox
83 endef
84
85 define Package/libjson-script/install
86 $(INSTALL_DIR) $(1)/lib/
87 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so $(1)/lib/
88 endef
89
90 define Package/libubox-lua/install
91 $(INSTALL_DIR) $(1)/usr/lib/lua
92 $(CP) $(PKG_BUILD_DIR)/lua/uloop.so $(1)/usr/lib/lua/
93 endef
94
95 $(eval $(call BuildPackage,libubox))
96 $(eval $(call BuildPackage,libblobmsg-json))
97 $(eval $(call BuildPackage,jshn))
98 $(eval $(call BuildPackage,libjson-script))
99 $(eval $(call BuildPackage,libubox-lua))