2 # Copyright (C) 2013 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
11 PKG_VERSION:=2013-09-09
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
15 PKG_SOURCE_URL:=git://nbd.name/luci2/rpcd.git
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE_VERSION:=22fbf13086653cba0c60d60ceb7baba2f33a034d
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
19 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/cmake.mk
29 define Build/InstallDev
30 $(INSTALL_DIR) $(1)/usr/include
31 $(CP) $(PKG_BUILD_DIR)/include/rpcd $(1)/usr/include/
34 define Package/rpcd/default
37 TITLE:=OpenWrt ubus RPC backend server
38 DEPENDS:=+libubus +libubox
42 $(Package/rpcd/default)
43 DEPENDS+= +libuci +libblobmsg-json
46 define Package/rpcd/description
47 This package provides the UBUS RPC backend server to expose various
48 functionality to frontend programs via JSON-RPC.
51 define Package/rpcd/install
52 $(INSTALL_DIR) $(1)/etc/init.d
53 $(INSTALL_BIN) ./files/rpcd.init $(1)/etc/init.d/rpcd
54 $(INSTALL_DIR) $(1)/sbin
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rpcd $(1)/sbin/rpcd
60 # 2: extra dependencies
61 # 3: plugin title/description
64 PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_luci-rpc-mod-$(1)
66 define Package/rpcd-mod-$(1)
67 $(Package/rpcd/default)
72 define Package/rpcd-mod-$(1)/description
76 define Package/rpcd-mod-$(1)/install
77 $(INSTALL_DIR) $$(1)/usr/lib/rpcd
78 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1).so $$(1)/usr/lib/rpcd/
81 $$(eval $$(call BuildPackage,rpcd-mod-$(1)))
85 $(eval $(call BuildPackage,rpcd))
86 $(eval $(call BuildPlugin,file,,Provides ubus calls for file and directory operations.))
87 $(eval $(call BuildPlugin,iwinfo,+libiwinfo,Provides ubus calls for accessing iwinfo data.))