procd: fix incorrect use of sizeof() in vsnprintf()
[openwrt.git] / package / system / ubus / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ubus
4 PKG_VERSION:=2013-09-29
5 PKG_RELEASE=$(PKG_SOURCE_VERSION)
6
7 PKG_SOURCE_PROTO:=git
8 PKG_SOURCE_URL:=git://nbd.name/luci2/ubus.git
9 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
10 PKG_SOURCE_VERSION:=6ae17d0298a8f1c24f16a68c8d1884091fb5c39f
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
12 PKG_MIRROR_MD5SUM:=
13 CMAKE_INSTALL:=1
14
15 PKG_LICENSE:=LGPLv2.1
16 PKG_LICENSE_FILES:=
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
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
35 endef
36
37 define Package/libubus
38   SECTION:=libs
39   CATEGORY:=Libraries
40   DEPENDS:=+libubox
41   TITLE:=OpenWrt RPC client library
42 endef
43
44 define Package/libubus-lua
45   SECTION:=libs
46   CATEGORY:=Libraries
47   DEPENDS:=+libubus +liblua
48   TITLE:=Lua binding for the OpenWrt RPC client
49 endef
50
51 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
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,ubus))
77 $(eval $(call BuildPackage,ubusd))
78 $(eval $(call BuildPackage,libubus))
79 $(eval $(call BuildPackage,libubus-lua))
80