treewide: clean up download hashes
[openwrt/openwrt.git] / package / system / rpcd / Makefile
1 #
2 # Copyright (C) 2013-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=rpcd
11 PKG_VERSION:=2016-06-30
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL=$(LEDE_GIT)/project/rpcd.git
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)
17 PKG_SOURCE_VERSION:=23417e94d25570e6d62542bac46edd51e8e0243a
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
19 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
20 PKG_MIRROR_HASH:=a52ce026105ff6d944896686399d97960f34246b4f7e0c464ff6631ed33325c9
21
22 PKG_LICENSE:=ISC
23 PKG_LICENSE_FILES:=
24
25 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
26 PKG_BUILD_PARALLEL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/cmake.mk
30
31 define Build/InstallDev
32 $(INSTALL_DIR) $(1)/usr/include
33 $(CP) $(PKG_BUILD_DIR)/include/rpcd $(1)/usr/include/
34 endef
35
36 define Package/rpcd/default
37 SECTION:=utils
38 CATEGORY:=Base system
39 TITLE:=OpenWrt ubus RPC backend server
40 DEPENDS:=+libubus +libubox
41 endef
42
43 define Package/rpcd
44 $(Package/rpcd/default)
45 DEPENDS+= +libuci +libblobmsg-json
46 endef
47
48 define Package/rpcd/description
49 This package provides the UBUS RPC backend server to expose various
50 functionality to frontend programs via JSON-RPC.
51 endef
52
53 define Package/rpcd/conffiles
54 /etc/config/rpcd
55 endef
56
57 define Package/rpcd/install
58 $(INSTALL_DIR) $(1)/etc/init.d
59 $(INSTALL_BIN) ./files/rpcd.init $(1)/etc/init.d/rpcd
60 $(INSTALL_DIR) $(1)/sbin
61 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rpcd $(1)/sbin/rpcd
62 $(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
63 $(INSTALL_DATA) $(PKG_BUILD_DIR)/unauthenticated.json $(1)/usr/share/rpcd/acl.d/unauthenticated.json
64 $(INSTALL_DIR) $(1)/etc/config
65 $(INSTALL_CONF) ./files/rpcd.config $(1)/etc/config/rpcd
66 endef
67
68
69 # 1: plugin name
70 # 2: extra dependencies
71 # 3: plugin title/description
72 define BuildPlugin
73
74 PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_luci-rpc-mod-$(1)
75
76 define Package/rpcd-mod-$(1)
77 $(Package/rpcd/default)
78 TITLE+= ($(1) plugin)
79 DEPENDS+=rpcd $(2)
80 endef
81
82 define Package/rpcd-mod-$(1)/description
83 $(3)
84 endef
85
86 define Package/rpcd-mod-$(1)/install
87 $(INSTALL_DIR) $$(1)/usr/lib/rpcd
88 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1).so $$(1)/usr/lib/rpcd/
89 endef
90
91 $$(eval $$(call BuildPackage,rpcd-mod-$(1)))
92
93 endef
94
95 $(eval $(call BuildPackage,rpcd))
96 $(eval $(call BuildPlugin,file,,Provides ubus calls for file and directory operations.))
97 $(eval $(call BuildPlugin,rpcsys,,Provides ubus calls for sysupgrade and password changing.))
98 $(eval $(call BuildPlugin,iwinfo,+libiwinfo,Provides ubus calls for accessing iwinfo data.))