0a4dbb89e08abe462f1cea43d596a943018697fe
[openwrt/svn-archive/archive.git] / package / procd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=procd
4 PKG_VERSION:=2013-05-30
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:=9ffeaae6e088a89f0118de2292a7c406745bbdc6
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:=John Crispin <blogic@openwrt.org>
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/cmake.mk
23
24 TARGET_LDFLAGS += $(if $(CONFIG_USE_EGLIBC),-lrt)
25
26 define Package/procd
27 SECTION:=base
28 CATEGORY:=Base system
29 DEPENDS:=+ubusd +ubus +libjson-script +USE_EGLIBC:librt +PROCD_INIT:ubox
30 TITLE:=OpenWrt system process manager
31 endef
32
33 ifneq ($(CONFIG_PROCD_INIT),)
34 define Package/procd/install
35 $(INSTALL_DIR) $(1)/sbin $(1)/lib/functions $(1)/etc
36
37 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{procd,askfirst,udevtrigger,logread} $(1)/sbin/
38 $(INSTALL_DATA) ./files/hotplug*.json $(1)/etc/
39 $(INSTALL_DATA) ./files/procd.sh $(1)/lib/functions/
40 ln -s /sbin/procd $(1)/sbin/init
41 endef
42 else
43 define Package/procd/install
44 $(INSTALL_DIR) $(1)/sbin $(1)/lib/functions $(1)/etc/init.d
45
46 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/procd $(1)/sbin/
47 $(INSTALL_BIN) ./files/procd.init $(1)/etc/init.d/procd
48 $(INSTALL_DATA) ./files/procd.sh $(1)/lib/functions/
49 endef
50 endif
51
52 $(eval $(call BuildPackage,procd))