source: trunk/debian/packages/libubox/trunk/Makefile @ 857

Last change on this file since 857 was 857, checked in by amain, 4 years ago

libubox: initial import / part 4

File size: 2.4 KB
Line 
1include $(TOPDIR)/rules.mk
2
3PKG_NAME:=libubox
4PKG_VERSION:=2016-07-29
5PKG_RELEASE=$(PKG_SOURCE_VERSION)
6
7PKG_SOURCE_PROTO:=git
8PKG_SOURCE_URL=$(OPENWRT_GIT)/project/libubox.git
9PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
10PKG_SOURCE_VERSION:=290c64ef5b5c3e75be851594f269d6a9568e64e5
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
12PKG_MIRROR_MD5SUM:=
13CMAKE_INSTALL:=1
14
15PKG_LICENSE:=ISC
16PKG_LICENSE_FILES:=
17
18PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
19
20PKG_BUILD_DEPENDS:=lua
21
22include $(INCLUDE_DIR)/package.mk
23include $(INCLUDE_DIR)/cmake.mk
24
25define Package/libubox
26  SECTION:=libs
27  CATEGORY:=Libraries
28  TITLE:=Basic utility library
29  ABI_VERSION:=$(PKG_VERSION)
30  DEPENDS:=
31endef
32
33define Package/libblobmsg-json
34  SECTION:=libs
35  CATEGORY:=Libraries
36  TITLE:=blobmsg <-> json conversion library
37  DEPENDS:=+libjson-c +libubox
38endef
39
40define Package/jshn
41  SECTION:=utils
42  CATEGORY:=Utilities
43  DEPENDS:=+libjson-c +libubox +libblobmsg-json
44  TITLE:=JSON SHell Notation
45endef
46
47define Package/jshn/description
48  Library for parsing and generating JSON from shell scripts
49endef
50
51define Package/libjson-script
52  SECTION:=utils
53  CATEGORY:=Utilities
54  DEPENDS:=+libubox
55  TITLE:=Minimalistic JSON based scripting engine
56endef
57
58define Package/libubox-lua
59  SECTION:=libs
60  CATEGORY:=Libraries
61  DEPENDS:=+libubox +liblua
62  TITLE:=Lua binding for the OpenWrt Basic utility library
63endef
64
65TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
66CMAKE_OPTIONS = \
67        -DLUAPATH=/usr/lib/lua
68
69define Package/libubox/install
70        $(INSTALL_DIR) $(1)/lib/
71        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so $(1)/lib/
72endef
73
74define Package/libblobmsg-json/install
75        $(INSTALL_DIR) $(1)/lib/
76        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so $(1)/lib/
77endef
78
79define 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
83endef
84
85define Package/libjson-script/install
86        $(INSTALL_DIR) $(1)/lib/
87        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so $(1)/lib/
88endef
89
90define Package/libubox-lua/install
91        $(INSTALL_DIR) $(1)/usr/lib/lua
92        $(CP) $(PKG_BUILD_DIR)/lua/uloop.so $(1)/usr/lib/lua/
93endef
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))
Note: See TracBrowser for help on using the repository browser.