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
|
2016-06-29 22:40:21 +00:00
|
|
|
PKG_VERSION:=2016-06-30
|
2013-09-02 15:36:51 +00:00
|
|
|
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
|
|
|
|
|
|
|
PKG_SOURCE_PROTO:=git
|
2016-06-06 19:16:47 +00:00
|
|
|
PKG_SOURCE_URL=$(LEDE_GIT)/project/rpcd.git
|
2013-09-13 13:24:32 +00:00
|
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
|
2016-06-29 22:40:21 +00:00
|
|
|
PKG_SOURCE_VERSION:=23417e94d25570e6d62542bac46edd51e8e0243a
|
2016-10-04 12:28:54 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
2016-06-07 09:42:32 +00:00
|
|
|
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
2016-12-16 16:32:10 +00:00
|
|
|
PKG_MIRROR_HASH:=a52ce026105ff6d944896686399d97960f34246b4f7e0c464ff6631ed33325c9
|
2013-09-02 15:36:51 +00:00
|
|
|
|
|
|
|
PKG_LICENSE:=ISC
|
|
|
|
PKG_LICENSE_FILES:=
|
|
|
|
|
2013-09-13 13:24:32 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
2013-09-02 15:36:51 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
|
|
|
|
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)
|
|
|
|
DEPENDS+= +libuci +libblobmsg-json
|
|
|
|
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
|
|
|
|
|
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
|
2013-09-02 15:36:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
|
# 1: plugin name
|
|
|
|
# 2: extra dependencies
|
|
|
|
# 3: plugin title/description
|
|
|
|
define BuildPlugin
|
|
|
|
|
|
|
|
PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_luci-rpc-mod-$(1)
|
|
|
|
|
|
|
|
define Package/rpcd-mod-$(1)
|
|
|
|
$(Package/rpcd/default)
|
|
|
|
TITLE+= ($(1) plugin)
|
|
|
|
DEPENDS+=rpcd $(2)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/rpcd-mod-$(1)/description
|
|
|
|
$(3)
|
|
|
|
endef
|
|
|
|
|
|
|
|
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.))
|
2013-09-02 15:36:51 +00:00
|
|
|
$(eval $(call BuildPlugin,iwinfo,+libiwinfo,Provides ubus calls for accessing iwinfo data.))
|