libubox: Update to latest version
[openwrt/openwrt.git] / package / system / ubus / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ubus
4 PKG_RELEASE:=1
5
6 PKG_SOURCE_PROTO:=git
7 PKG_SOURCE_URL=$(LEDE_GIT)/project/ubus.git
8 PKG_SOURCE_DATE:=2017-01-22
9 PKG_SOURCE_VERSION:=6f4e11e1db399074273944329883f9c35e7daef6
10 PKG_MIRROR_HASH:=4b80cf4ff8fa0e103d6626014404c031a9e886b8fbc422fb65a9c36b3b787585
11 CMAKE_INSTALL:=1
12
13 PKG_LICENSE:=LGPL-2.1
14 PKG_LICENSE_FILES:=
15
16 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
17
18 include $(INCLUDE_DIR)/package.mk
19 include $(INCLUDE_DIR)/cmake.mk
20
21 define Package/ubus
22 SECTION:=base
23 CATEGORY:=Base system
24 DEPENDS:=+libubus +libblobmsg-json +ubusd
25 TITLE:=OpenWrt RPC client utility
26 endef
27
28 define Package/ubusd
29 SECTION:=base
30 CATEGORY:=Base system
31 TITLE:=OpenWrt RPC daemon
32 DEPENDS:=+libubox +libblobmsg-json
33 endef
34
35 define Package/libubus
36 SECTION:=libs
37 CATEGORY:=Libraries
38 DEPENDS:=+libubox
39 ABI_VERSION:=$(PKG_VERSION)
40 TITLE:=OpenWrt RPC client library
41 endef
42
43 define Package/libubus-lua
44 SECTION:=libs
45 CATEGORY:=Libraries
46 DEPENDS:=+libubus +liblua
47 TITLE:=Lua binding for the OpenWrt RPC client
48 endef
49
50 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
51
52 CMAKE_OPTIONS = \
53 -DLUAPATH=/usr/lib/lua
54
55 define Package/ubus/install
56 $(INSTALL_DIR) $(1)/bin
57 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ubus $(1)/bin/
58 endef
59
60 define Package/ubusd/install
61 $(INSTALL_DIR) $(1)/sbin
62 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ubusd $(1)/sbin/
63 endef
64
65 define Package/libubus/install
66 $(INSTALL_DIR) $(1)/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/lib/
68 endef
69
70 define Package/libubus-lua/install
71 $(INSTALL_DIR) $(1)/usr/lib/lua
72 $(CP) $(PKG_BUILD_DIR)/lua/ubus.so $(1)/usr/lib/lua/
73 endef
74
75 $(eval $(call BuildPackage,libubus))
76 $(eval $(call BuildPackage,libubus-lua))
77 $(eval $(call BuildPackage,ubus))
78 $(eval $(call BuildPackage,ubusd))