ec55c726a00845e0fa78f17ae017e277ea53b0b6
[openwrt/svn-archive/archive.git] / package / ubus / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ubus
4 PKG_VERSION:=2013-05-30
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:=f72dca720bb50d45b1b01bab5b01cb80c78c5230
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:=luci2
25 CATEGORY:=LuCI2
26 SUBMENU:=System
27 DEPENDS:=+libubus +libblobmsg-json +ubusd
28 TITLE:=OpenWrt RPC client utility
29 endef
30
31 define Package/ubusd
32 SECTION:=luci2
33 CATEGORY:=LuCI2
34 SUBMENU:=System
35 TITLE:=OpenWrt RPC daemon
36 DEPENDS:=+libubox
37 endef
38
39 define Package/libubus
40 SECTION:=luci2
41 CATEGORY:=LuCI2
42 SUBMENU:=Libraries
43 DEPENDS:=+libubox
44 TITLE:=OpenWrt RPC client library
45 endef
46
47 define Package/libubus-lua
48 SECTION:=luci2
49 CATEGORY:=LuCI2
50 SUBMENU:=Libraries
51 DEPENDS:=+libubus +liblua
52 TITLE:=Lua binding for the OpenWrt RPC client
53 endef
54
55 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
56
57 CMAKE_OPTIONS = \
58 -DLUAPATH=/usr/lib/lua
59
60 define Package/ubus/install
61 $(INSTALL_DIR) $(1)/bin
62 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ubus $(1)/bin/
63 endef
64
65 define Package/ubusd/install
66 $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d
67 $(INSTALL_BIN) ./files/ubus.init $(1)/etc/init.d/ubus
68 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ubusd $(1)/sbin/
69 endef
70
71 define Package/libubus/install
72 $(INSTALL_DIR) $(1)/lib
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/lib/
74 endef
75
76 define Package/libubus-lua/install
77 $(INSTALL_DIR) $(1)/usr/lib/lua
78 $(CP) $(PKG_BUILD_DIR)/lua/ubus.so $(1)/usr/lib/lua/
79 endef
80
81 $(eval $(call BuildPackage,ubus))
82 $(eval $(call BuildPackage,ubusd))
83 $(eval $(call BuildPackage,libubus))
84 $(eval $(call BuildPackage,libubus-lua))
85