2013-09-02 15:36:51 +00:00
|
|
|
#
|
2016-04-13 07:33:24 +00:00
|
|
|
# Copyright (C) 2013-2016 OpenWrt.org
|
2013-09-02 15:36:51 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=rpcd
|
2023-03-14 21:34:48 +00:00
|
|
|
PKG_RELEASE:=1
|
2013-09-02 15:36:51 +00:00
|
|
|
|
|
|
|
PKG_SOURCE_PROTO:=git
|
2018-01-05 09:46:06 +00:00
|
|
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
|
2024-09-17 18:06:55 +00:00
|
|
|
PKG_MIRROR_HASH:=67b2cb985d8712a3e5a17ebf8c74fd35d553c8f9a4197616f9a3649a8740cc33
|
|
|
|
PKG_SOURCE_DATE:=2024-09-17
|
|
|
|
PKG_SOURCE_VERSION:=9f4b86e70352ab9ca6aa272d096419acc53e2390
|
2016-06-07 09:42:32 +00:00
|
|
|
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
2013-09-02 15:36:51 +00:00
|
|
|
|
|
|
|
PKG_LICENSE:=ISC
|
|
|
|
PKG_LICENSE_FILES:=
|
|
|
|
|
2020-01-09 13:09:44 +00:00
|
|
|
PKG_ASLR_PIE_REGULAR:=1
|
2013-09-02 15:36:51 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
include $(INCLUDE_DIR)/cmake.mk
|
|
|
|
|
2013-09-09 14:35:15 +00:00
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/rpcd $(1)/usr/include/
|
|
|
|
endef
|
|
|
|
|
2013-09-02 15:36:51 +00:00
|
|
|
define Package/rpcd/default
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Base system
|
|
|
|
TITLE:=OpenWrt ubus RPC backend server
|
|
|
|
DEPENDS:=+libubus +libubox
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/rpcd
|
|
|
|
$(Package/rpcd/default)
|
2019-06-21 15:41:28 +00:00
|
|
|
DEPENDS+= +libuci +libblobmsg-json +libjson-c
|
2013-09-02 15:36:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/rpcd/description
|
|
|
|
This package provides the UBUS RPC backend server to expose various
|
|
|
|
functionality to frontend programs via JSON-RPC.
|
|
|
|
endef
|
|
|
|
|
2013-09-11 12:13:33 +00:00
|
|
|
define Package/rpcd/conffiles
|
|
|
|
/etc/config/rpcd
|
|
|
|
endef
|
|
|
|
|
2017-01-01 00:13:34 +00:00
|
|
|
TARGET_LDFLAGS += -lcrypt
|
|
|
|
|
2013-09-02 15:36:51 +00:00
|
|
|
define Package/rpcd/install
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/rpcd.init $(1)/etc/init.d/rpcd
|
|
|
|
$(INSTALL_DIR) $(1)/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rpcd $(1)/sbin/rpcd
|
2013-09-11 12:13:33 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/unauthenticated.json $(1)/usr/share/rpcd/acl.d/unauthenticated.json
|
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
|
|
$(INSTALL_CONF) ./files/rpcd.config $(1)/etc/config/rpcd
|
2020-10-22 14:02:58 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
|
|
$(INSTALL_BIN) ./files/50-migrate-rpcd-ubus-sock.sh $(1)/etc/uci-defaults
|
2013-09-02 15:36:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
# 1: plugin name
|
2022-12-15 23:27:02 +00:00
|
|
|
# 2: additional dependencies
|
2013-09-02 15:36:51 +00:00
|
|
|
# 3: plugin title/description
|
2022-12-15 23:27:02 +00:00
|
|
|
# 4: extra dependencies
|
2013-09-02 15:36:51 +00:00
|
|
|
define BuildPlugin
|
|
|
|
|
2022-02-07 09:31:17 +00:00
|
|
|
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_rpcd-mod-$(1)
|
2013-09-02 15:36:51 +00:00
|
|
|
|
|
|
|
define Package/rpcd-mod-$(1)
|
|
|
|
$(Package/rpcd/default)
|
|
|
|
TITLE+= ($(1) plugin)
|
|
|
|
DEPENDS+=rpcd $(2)
|
2022-12-15 23:27:02 +00:00
|
|
|
EXTRA_DEPENDS:=$(4)
|
2013-09-02 15:36:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/rpcd-mod-$(1)/description
|
|
|
|
$(3)
|
|
|
|
endef
|
|
|
|
|
2021-10-29 11:14:16 +00:00
|
|
|
define Package/rpcd-mod-$(1)/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
[ -n "$$$${IPKG_INSTROOT}" ] || /etc/init.d/rpcd reload
|
|
|
|
endef
|
|
|
|
|
2013-09-02 15:36:51 +00:00
|
|
|
define Package/rpcd-mod-$(1)/install
|
|
|
|
$(INSTALL_DIR) $$(1)/usr/lib/rpcd
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1).so $$(1)/usr/lib/rpcd/
|
|
|
|
endef
|
|
|
|
|
|
|
|
$$(eval $$(call BuildPackage,rpcd-mod-$(1)))
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,rpcd))
|
|
|
|
$(eval $(call BuildPlugin,file,,Provides ubus calls for file and directory operations.))
|
2015-10-01 18:44:26 +00:00
|
|
|
$(eval $(call BuildPlugin,rpcsys,,Provides ubus calls for sysupgrade and password changing.))
|
2024-05-03 15:43:08 +00:00
|
|
|
$(eval $(call BuildPlugin,iwinfo,+libiwinfo,Provides ubus calls for accessing iwinfo data.,libiwinfo (>=2023.01.21)))
|
2022-02-07 09:31:17 +00:00
|
|
|
$(eval $(call BuildPlugin,ucode,+libucode,Allows implementing plugins using ucode scripts.))
|