762fb5f18fd1dbb4940a982d9f53169ad8c8e38f
[openwrt.git] / package / procd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=procd
4 PKG_VERSION:=2013-03-14
5 PKG_RELEASE=$(PKG_SOURCE_VERSION)
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:=9fcc900e301e0c304488b6b83f10c8db5b8f4ce0
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_CONFIG_DEPENDS:=CONFIG_PROCD_INIT
18
19 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/cmake.mk
23
24 define Package/procd
25   SECTION:=base
26   CATEGORY:=Base system
27   DEPENDS:=+ubusd +ubus +libjson-script
28   TITLE:=OpenWrt system process manager
29 endef
30
31 ifneq ($(CONFIG_PROCD_INIT),)
32 define Package/procd/install
33         $(INSTALL_DIR) $(1)/sbin $(1)/lib/functions $(1)/etc
34
35         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{procd,askfirst,udevtrigger,logread} $(1)/sbin/
36         $(INSTALL_DATA) ./files/hotplug*.json $(1)/etc/
37         $(INSTALL_DATA) ./files/procd.sh $(1)/lib/functions/
38         ln -s /sbin/procd $(1)/sbin/init
39 endef
40 else
41 define Package/procd/install
42         $(INSTALL_DIR) $(1)/sbin $(1)/lib/functions $(1)/etc/init.d
43
44         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/procd $(1)/sbin/
45         $(INSTALL_BIN) ./files/procd.init $(1)/etc/init.d/procd
46         $(INSTALL_DATA) ./files/procd.sh $(1)/lib/functions/
47 endef
48 endif
49
50 $(eval $(call BuildPackage,procd))