2 # Copyright (C) 2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
11 PKG_VERSION:=2014-10-06
13 PKG_RELEASE=$(PKG_SOURCE_VERSION)
16 PKG_SOURCE_URL:=git://nbd.name/luci2/procd.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=f45672d80bf2fec4ccb7363de1da6adb9e3f4421
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
25 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/cmake.mk
30 TARGET_LDFLAGS += $(if $(CONFIG_USE_EGLIBC),-lrt)
35 DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_EGLIBC:librt +libubox +libubus +NAND_SUPPORT:procd-nand
36 TITLE:=OpenWrt system process manager
39 define Package/procd-nand
42 DEPENDS:=@NAND_SUPPORT +ubi-utils
43 TITLE:=OpenWrt sysupgrade nand helper
46 define Package/procd/install
47 $(INSTALL_DIR) $(1)/sbin $(1)/etc $(1)/lib/functions
49 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{init,procd,askfirst,udevtrigger} $(1)/sbin/
50 $(INSTALL_BIN) ./files/reload_config $(1)/sbin/
51 $(INSTALL_DATA) ./files/hotplug*.json $(1)/etc/
52 $(INSTALL_DATA) ./files/procd.sh $(1)/lib/functions/
55 define Package/procd-nand/install
56 $(INSTALL_DIR) $(1)/sbin $(1)/lib/upgrade
58 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/upgraded $(1)/sbin/
59 $(INSTALL_DATA) ./files/nand.sh $(1)/lib/upgrade/
62 $(eval $(call BuildPackage,procd))
63 $(eval $(call BuildPackage,procd-nand))