kernel: Fix FIQ code on VIVT CPUs (#14145)
[openwrt.git] / package / system / rpcd / Makefile
1 #
2 # Copyright (C) 2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=rpcd
11 PKG_VERSION:=2013-09-09
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
13
14 PKG_SOURCE_PROTO:=git
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>
20
21 PKG_LICENSE:=ISC
22 PKG_LICENSE_FILES:=
23
24 PKG_BUILD_PARALLEL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/cmake.mk
28
29 define Build/InstallDev
30         $(INSTALL_DIR) $(1)/usr/include
31         $(CP) $(PKG_BUILD_DIR)/include/rpcd $(1)/usr/include/
32 endef
33
34 define Package/rpcd/default
35   SECTION:=utils
36   CATEGORY:=Base system
37   TITLE:=OpenWrt ubus RPC backend server
38   DEPENDS:=+libubus +libubox
39 endef
40
41 define Package/rpcd
42   $(Package/rpcd/default)
43   DEPENDS+= +libuci +libblobmsg-json
44 endef
45
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.
49 endef
50
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
56 endef
57
58
59 # 1: plugin name
60 # 2: extra dependencies
61 # 3: plugin title/description
62 define BuildPlugin
63
64   PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_luci-rpc-mod-$(1)
65
66   define Package/rpcd-mod-$(1)
67     $(Package/rpcd/default)
68     TITLE+= ($(1) plugin)
69     DEPENDS+=rpcd $(2)
70   endef
71
72   define Package/rpcd-mod-$(1)/description
73     $(3)
74   endef
75
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/
79   endef
80
81   $$(eval $$(call BuildPackage,rpcd-mod-$(1)))
82
83 endef
84
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.))