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