source: trunk/package/ubus/Makefile @ 28496

Last change on this file since 28496 was 28496, checked in by nbd, 5 years ago

ubusd: add an init script

File size: 1.4 KB
Line 
1include $(TOPDIR)/rules.mk
2
3PKG_NAME:=ubus
4PKG_VERSION:=2011-10-10
5PKG_RELEASE=$(PKG_SOURCE_VERSION)
6
7PKG_SOURCE_PROTO:=git
8PKG_SOURCE_URL:=git://nbd.name/luci2/ubus.git
9PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
10PKG_SOURCE_VERSION:=1ad3493658fe3a3782e51efe960c07549f117a28
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
12PKG_MIRROR_MD5SUM:=e52e88902b3a065c168d1dbeeac5b4ce
13CMAKE_INSTALL:=1
14
15include $(INCLUDE_DIR)/package.mk
16include $(INCLUDE_DIR)/cmake.mk
17
18define Package/ubus
19  SECTION:=luci2
20  CATEGORY:=LuCI2
21  SUBMENU:=System
22  DEPENDS:=+libubus +libblobmsg-json +ubusd
23  TITLE:=OpenWrt RPC client utility
24endef
25
26define Package/ubusd
27  SECTION:=luci2
28  CATEGORY:=LuCI2
29  SUBMENU:=System
30  TITLE:=OpenWrt RPC daemon
31endef
32
33define Package/libubus
34  SECTION:=luci2
35  CATEGORY:=LuCI2
36  SUBMENU:=Libraries
37  DEPENDS:=+libubox
38  TITLE:=OpenWrt RPC client library
39endef
40
41TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
42
43define Package/ubus/install
44        $(INSTALL_DIR) $(1)/bin
45        $(CP) $(PKG_INSTALL_DIR)/usr/bin/ubus $(1)/bin/
46endef
47
48define Package/ubusd/install
49        $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d
50        $(INSTALL_BIN) ./files/ubus.init $(1)/etc/init.d/ubus
51        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ubusd $(1)/sbin/
52endef
53
54define Package/libubus/install
55        $(INSTALL_DIR) $(1)/lib
56        $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/lib/
57endef
58
59$(eval $(call BuildPackage,ubus))
60$(eval $(call BuildPackage,ubusd))
61$(eval $(call BuildPackage,libubus))
62
Note: See TracBrowser for help on using the repository browser.