procd: fix the running hook #38868
[openwrt.git] / package / system / procd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=procd
4 PKG_VERSION:=2013-11-20
5
6 PKG_RELEASE=$(PKG_SOURCE_VERSION)
7
8 PKG_SOURCE_PROTO:=git
9 PKG_SOURCE_URL:=git://nbd.name/luci2/procd.git
10 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
11 PKG_SOURCE_VERSION:=21d307367eb991f7494ce43087a5edb94288d08f
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
13 CMAKE_INSTALL:=1
14
15 PKG_LICENSE:=GPLv2
16 PKG_LICENSE_FILES:=
17
18 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/cmake.mk
22
23 TARGET_LDFLAGS += $(if $(CONFIG_USE_EGLIBC),-lrt)
24
25 define Package/procd
26   SECTION:=base
27   CATEGORY:=Base system
28   DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_EGLIBC:librt
29   TITLE:=OpenWrt system process manager
30 endef
31
32 define Package/procd/install
33         $(INSTALL_DIR) $(1)/sbin  $(1)/etc $(1)/lib/functions
34
35         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{init,procd,askfirst,udevtrigger} $(1)/sbin/
36         $(INSTALL_BIN) ./files/reload_config $(1)/sbin/
37         $(INSTALL_DATA) ./files/hotplug*.json $(1)/etc/
38         $(INSTALL_DATA) ./files/procd.sh $(1)/lib/functions/
39 endef
40
41 $(eval $(call BuildPackage,procd))