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