libubox: fix mirror hash
[openwrt/openwrt.git] / package / libs / libubox / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=libubox
4 PKG_RELEASE=1
5
6 PKG_SOURCE_PROTO:=git
7 PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
8 PKG_SOURCE_DATE:=2018-07-25
9 PKG_SOURCE_VERSION:=c83a84afbef2b24f960ddeda0b5e2ab01fba6981
10 PKG_MIRROR_HASH:=4a9594d2ae3706174d182a21fe815f1d18c20beca6593707cc757994975dc670
11 CMAKE_INSTALL:=1
12
13 PKG_LICENSE:=ISC
14 PKG_LICENSE_FILES:=
15
16 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
17
18 PKG_BUILD_DEPENDS:=lua
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/host-build.mk
22 include $(INCLUDE_DIR)/cmake.mk
23
24 define Package/libubox
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=Basic utility library
28 ABI_VERSION:=$(PKG_VERSION)
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 +libubox +libblobmsg-json
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 define Package/libubox-lua
58 SECTION:=libs
59 CATEGORY:=Libraries
60 DEPENDS:=+libubox +liblua
61 TITLE:=Lua binding for the OpenWrt Basic utility library
62 endef
63
64 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
65 CMAKE_OPTIONS = \
66 -DLUAPATH=/usr/lib/lua
67
68 define Package/libubox/install
69 $(INSTALL_DIR) $(1)/lib/
70 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libubox.so $(1)/lib/
71 endef
72
73 define Package/libblobmsg-json/install
74 $(INSTALL_DIR) $(1)/lib/
75 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblobmsg_json.so $(1)/lib/
76 endef
77
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
82 endef
83
84 define Package/libjson-script/install
85 $(INSTALL_DIR) $(1)/lib/
86 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libjson_script.so $(1)/lib/
87 endef
88
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/
92 endef
93
94
95 CMAKE_HOST_OPTIONS += \
96 -DBUILD_LUA=OFF \
97 -DBUILD_EXAMPLES=OFF \
98
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))