ubus: update to latest git HEAD
[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=$(PROJECT_GIT)/project/ubus.git
8 PKG_SOURCE_DATE:=2018-07-25
9 PKG_SOURCE_VERSION:=884be451622d21fe3a7b06cc5b9d245bc4fffbf2
10 PKG_MIRROR_HASH:=4f4bceade7f4027bc1d813c7f6810eabe514a04dfb470e6d48918b79dfdf847f
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 -flto
51 TARGET_LDFLAGS += -flto
52
53 CMAKE_OPTIONS = \
54 -DLUAPATH=/usr/lib/lua
55
56 define Package/ubus/install
57 $(INSTALL_DIR) $(1)/bin
58 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ubus $(1)/bin/
59 endef
60
61 define Package/ubusd/install
62 $(INSTALL_DIR) $(1)/sbin
63 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ubusd $(1)/sbin/
64 endef
65
66 define Package/libubus/install
67 $(INSTALL_DIR) $(1)/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/lib/
69 endef
70
71 define Package/libubus-lua/install
72 $(INSTALL_DIR) $(1)/usr/lib/lua
73 $(CP) $(PKG_BUILD_DIR)/lua/ubus.so $(1)/usr/lib/lua/
74 endef
75
76 $(eval $(call BuildPackage,libubus))
77 $(eval $(call BuildPackage,libubus-lua))
78 $(eval $(call BuildPackage,ubus))
79 $(eval $(call BuildPackage,ubusd))