procd: compile with LTO enabled
[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-01-16
9 PKG_SOURCE_VERSION:=5bae22eb5472c9c7cc30caa9a84004bba19940d3
10 PKG_MIRROR_HASH:=6f46398279339dcc597965306275fe1272af384f8cb253ee8de2c68e366eed55
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))