procd: update to latest git HEAD
[15.05/openwrt.git] / package / system / procd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=procd
4 PKG_VERSION:=2014-06-16
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:=202318c6163657fc671b27527e5228cb8170af1d
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 +libubox +libubus +NAND_SUPPORT:procd-nand
29   TITLE:=OpenWrt system process manager
30 endef
31
32 define Package/procd-nand
33   SECTION:=utils
34   CATEGORY:=Utilities
35   DEPENDS:=@NAND_SUPPORT +ubi-utils
36   TITLE:=OpenWrt system process manager
37 endef
38
39 define Package/procd/install
40         $(INSTALL_DIR) $(1)/sbin $(1)/etc $(1)/lib/functions
41
42         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{init,procd,askfirst,udevtrigger} $(1)/sbin/
43         $(INSTALL_BIN) ./files/reload_config $(1)/sbin/
44         $(INSTALL_DATA) ./files/hotplug*.json $(1)/etc/
45         $(INSTALL_DATA) ./files/procd.sh $(1)/lib/functions/
46 endef
47
48 define Package/procd-nand/install
49         $(INSTALL_DIR) $(1)/sbin $(1)/lib/upgrade
50
51         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/upgraded $(1)/sbin/
52         $(INSTALL_DATA) ./files/nand.sh $(1)/lib/upgrade/
53 endef
54
55 $(eval $(call BuildPackage,procd))
56 $(eval $(call BuildPackage,procd-nand))