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
)/project
/rpcd.git
15 PKG_MIRROR_HASH
:=f5a8f4342ef581fb8750fc41c4e7dfee808a97b3e2a53dbf9d7f51e48b35bae6
16 PKG_SOURCE_DATE
:=2022-05-31
17 PKG_SOURCE_VERSION
:=1c4825739b3cf19fe429c19eafa82a7f27aa99b3
18 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
23 PKG_ASLR_PIE_REGULAR
:=1
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
:=OpenWrt 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 # -I$(STAGING_DIR)/usr/include/libnl-tiny
57 # -I$(STAGING_DIR)/usr/include \
60 define Package
/rpcd
/install
61 $(INSTALL_DIR
) $(1)/etc
/init.d
62 $(INSTALL_BIN
) .
/files
/rpcd.init
$(1)/etc
/init.d
/rpcd
63 $(INSTALL_DIR
) $(1)/sbin
64 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/rpcd
$(1)/sbin
/rpcd
65 $(INSTALL_DIR
) $(1)/usr
/share
/rpcd
/acl.d
66 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/unauthenticated.json
$(1)/usr
/share
/rpcd
/acl.d
/unauthenticated.json
67 $(INSTALL_DIR
) $(1)/etc
/config
68 $(INSTALL_CONF
) .
/files
/rpcd.config
$(1)/etc
/config
/rpcd
69 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
70 $(INSTALL_BIN
) .
/files
/50-migrate-rpcd-ubus-sock.sh
$(1)/etc
/uci-defaults
75 # 2: extra dependencies
76 # 3: plugin title/description
79 PKG_CONFIG_DEPENDS
+= CONFIG_PACKAGE_rpcd-mod-
$(1)
81 define Package
/rpcd-mod-
$(1)
82 $(Package
/rpcd
/default
)
87 define Package
/rpcd-mod-
$(1)/description
91 define Package
/rpcd-mod-
$(1)/postinst
93 [ -n
"$$$${IPKG_INSTROOT}" ] ||
/etc
/init.d
/rpcd reload
96 define Package
/rpcd-mod-
$(1)/install
97 $(INSTALL_DIR
) $$(1)/usr
/lib
/rpcd
98 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/$(1).so
$$(1)/usr
/lib
/rpcd
/
101 $$(eval
$$(call BuildPackage
,rpcd-mod-
$(1)))
105 $(eval
$(call BuildPackage
,rpcd
))
106 $(eval
$(call BuildPlugin
,file
,,Provides ubus calls for file and directory operations.
))
107 $(eval
$(call BuildPlugin
,rpcsys
,,Provides ubus calls for sysupgrade and password changing.
))
108 $(eval
$(call BuildPlugin
,iwinfo
,+libiwinfo
,Provides ubus calls for accessing iwinfo data.
))
109 $(eval
$(call BuildPlugin
,ucode
,+libucode
,Allows implementing plugins using ucode scripts.
))
110 $(eval
$(call BuildPlugin
,nl80211
,+libnl-tiny
,Provides ubus calls for accessing nl80211 data.
))