2 # Copyright (C) 2013-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE_URL=$(PROJECT_GIT)/rpcd.git
15 PKG_SOURCE_DATE:=2020-05-26
16 PKG_SOURCE_VERSION:=67c8a3fda26e441d3ec4a19f50ac72eca8deb14b
17 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
18 PKG_MIRROR_HASH:=cfe44e600093a424d1133b55a141c5becb708f48ee4fc8b7a98a82495ced7c72
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/cmake.mk
28 define Build/InstallDev
29 $(INSTALL_DIR) $(1)/usr/include
30 $(CP) $(PKG_BUILD_DIR)/include/rpcd $(1)/usr/include/
33 define Package/rpcd/default
36 TITLE:=libreCMC ubus RPC backend server
37 DEPENDS:=+libubus +libubox
41 $(Package/rpcd/default)
42 DEPENDS+= +libuci +libblobmsg-json +libjson-c
45 define Package/rpcd/description
46 This package provides the UBUS RPC backend server to expose various
47 functionality to frontend programs via JSON-RPC.
50 define Package/rpcd/conffiles
54 TARGET_LDFLAGS += -lcrypt
56 define Package/rpcd/install
57 $(INSTALL_DIR) $(1)/etc/init.d
58 $(INSTALL_BIN) ./files/rpcd.init $(1)/etc/init.d/rpcd
59 $(INSTALL_DIR) $(1)/sbin
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rpcd $(1)/sbin/rpcd
61 $(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
62 $(INSTALL_DATA) $(PKG_BUILD_DIR)/unauthenticated.json $(1)/usr/share/rpcd/acl.d/unauthenticated.json
63 $(INSTALL_DIR) $(1)/etc/config
64 $(INSTALL_CONF) ./files/rpcd.config $(1)/etc/config/rpcd
69 # 2: extra dependencies
70 # 3: plugin title/description
73 PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_luci-rpc-mod-$(1)
75 define Package/rpcd-mod-$(1)
76 $(Package/rpcd/default)
81 define Package/rpcd-mod-$(1)/description
85 define Package/rpcd-mod-$(1)/install
86 $(INSTALL_DIR) $$(1)/usr/lib/rpcd
87 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1).so $$(1)/usr/lib/rpcd/
90 $$(eval $$(call BuildPackage,rpcd-mod-$(1)))
94 $(eval $(call BuildPackage,rpcd))
95 $(eval $(call BuildPlugin,file,,Provides ubus calls for file and directory operations.))
96 $(eval $(call BuildPlugin,rpcsys,,Provides ubus calls for sysupgrade and password changing.))
97 $(eval $(call BuildPlugin,iwinfo,+libiwinfo,Provides ubus calls for accessing iwinfo data.))