rt2x00: merge fix for queue stopping
[openwrt/openwrt.git] / package / libs / libubox / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=libubox
4 PKG_VERSION:=2013-07-24
5 PKG_RELEASE=$(PKG_SOURCE_VERSION)
6
7 PKG_SOURCE_PROTO:=git
8 PKG_SOURCE_URL:=git://nbd.name/luci2/libubox.git
9 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
10 PKG_SOURCE_VERSION:=510e4956e58727d68fbf7dea1646a344d6901c91
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 BSD-3c
16 PKG_LICENSE_FILES:=
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
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 DEPENDS:=
30 endef
31
32 define Package/libblobmsg-json
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE:=blobmsg <-> json conversion library
36 DEPENDS:=+libjson-c +libubox
37 endef
38
39 define Package/jshn
40 SECTION:=utils
41 CATEGORY:=Utilities
42 DEPENDS:=+libjson-c
43 TITLE:=JSON SHell Notation
44 endef
45
46 define Package/jshn/description
47 Library for parsing and generating JSON from shell scripts
48 endef
49
50 define Package/libjson-script
51 SECTION:=utils
52 CATEGORY:=Utilities
53 DEPENDS:=+libubox
54 TITLE:=Minimalistic JSON based scripting engine
55 endef
56
57 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
58 CMAKE_OPTIONS = \
59 -DLUAPATH=/usr/lib/lua
60
61 define Package/libubox/install
62 $(INSTALL_DIR) $(1)/lib/
63 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so $(1)/lib/
64 endef
65
66 define Package/libblobmsg-json/install
67 $(INSTALL_DIR) $(1)/lib/
68 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so $(1)/lib/
69 endef
70
71 define Package/jshn/install
72 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/libubox
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jshn $(1)/usr/bin
74 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libubox/jshn.sh $(1)/usr/share/libubox
75 endef
76
77 define Package/libjson-script/install
78 $(INSTALL_DIR) $(1)/lib/
79 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so $(1)/lib/
80 endef
81
82 $(eval $(call BuildPackage,libubox))
83 $(eval $(call BuildPackage,libblobmsg-json))
84 $(eval $(call BuildPackage,jshn))
85 $(eval $(call BuildPackage,libjson-script))