2 # Copyright (C) 2014-2015 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
:=2015-10-26
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
:=d5fddd91b966424bb63e943e789704d52382cc18
19 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.gz
25 PKG_MAINTAINER
:=John Crispin
<blogic@openwrt.org
>
27 PKG_CONFIG_DEPENDS
:= CONFIG_KERNEL_SECCOMP CONFIG_NAND_SUPPORT CONFIG_PROCD_SHOW_BOOT CONFIG_PROCD_ZRAM_TMPFS \
28 CONFIG_KERNEL_NAMESPACES CONFIG_PACKAGE_procd-ujail CONFIG_PACKAGE_procd-seccomp
30 include $(INCLUDE_DIR
)/package.mk
31 include $(INCLUDE_DIR
)/cmake.mk
33 TARGET_LDFLAGS
+= $(if
$(CONFIG_USE_GLIBC
),-lrt
)
38 DEPENDS
:=+ubusd
+ubus
+libjson-script
+ubox
+USE_GLIBC
:librt
+libubox
+libubus
+NAND_SUPPORT
:procd-nand
39 TITLE
:=OpenWrt system process manager
42 define Package
/procd-ujail
45 DEPENDS
:=@KERNEL_NAMESPACES
+@KERNEL_UTS_NS
+@KERNEL_IPC_NS
+@KERNEL_PID_NS
+libubox
+libblobmsg-json
46 TITLE
:=OpenWrt process jail helper
49 define Package
/procd-seccomp
52 DEPENDS
:=@arm||@armeb||@mips||@mipsel||@i386||@x86_64 @
!TARGET_uml @KERNEL_SECCOMP
+libubox
+libblobmsg-json
53 TITLE
:=OpenWrt process seccomp helper
+ utrace
56 define Package
/procd-nand
59 DEPENDS
:=@NAND_SUPPORT
+ubi-utils
60 TITLE
:=OpenWrt sysupgrade nand helper
63 define Package
/procd-nand-firstboot
67 TITLE
:=OpenWrt firstboot nand helper
70 define Package
/procd
/config
72 depends on PACKAGE_procd
74 config PROCD_SHOW_BOOT
77 prompt
"Print the shutdown to the console as well as logging it to syslog"
79 config PROCD_ZRAM_TMPFS
82 prompt
"Mount /tmp using zram."
87 ifeq ($(CONFIG_NAND_SUPPORT
),y
)
88 CMAKE_OPTIONS
+= -DBUILD_UPGRADED
=1
91 ifeq ($(CONFIG_PROCD_SHOW_BOOT
),y
)
92 CMAKE_OPTIONS
+= -DSHOW_BOOT_ON_CONSOLE
=1
95 ifeq ($(CONFIG_PROCD_ZRAM_TMPFS
),y
)
96 CMAKE_OPTIONS
+= -DZRAM_TMPFS
=1
99 ifdef CONFIG_PACKAGE_procd-ujail
100 CMAKE_OPTIONS
+= -DJAIL_SUPPORT
=1
103 ifdef CONFIG_PACKAGE_procd-seccomp
104 CMAKE_OPTIONS
+= -DSECCOMP_SUPPORT
=1 -DUTRACE_SUPPORT
=1
107 define Package
/procd
/install
108 $(INSTALL_DIR
) $(1)/sbin
$(1)/etc
$(1)/lib
/functions
110 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/{init
,procd
,askfirst
,udevtrigger
} $(1)/sbin
/
111 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsetlbf.so
$(1)/lib
112 $(INSTALL_BIN
) .
/files
/reload_config
$(1)/sbin
/
113 $(INSTALL_DATA
) .
/files
/hotplug
*.json
$(1)/etc
/
114 $(INSTALL_DATA
) .
/files
/procd.sh
$(1)/lib
/functions
/
117 define Package
/procd-ujail
/install
118 $(INSTALL_DIR
) $(1)/sbin
119 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ujail
$(1)/sbin
/
122 define Package
/procd-seccomp
/install
123 $(INSTALL_DIR
) $(1)/sbin
$(1)/lib
124 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpreload-seccomp.so
$(1)/lib
125 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/utrace
$(1)/sbin
/
126 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpreload-trace.so
$(1)/lib
129 define Package
/procd-nand
/install
130 $(INSTALL_DIR
) $(1)/sbin
$(1)/lib
/upgrade
132 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/upgraded
$(1)/sbin
/
133 $(INSTALL_DATA
) .
/files
/nand.sh
$(1)/lib
/upgrade
/
136 define Package
/procd-nand-firstboot
/install
137 $(INSTALL_DIR
) $(1)/lib
/preinit
139 $(INSTALL_DATA
) .
/files
/nand-preinit.sh
$(1)/lib
/preinit
/60-nand-firstboot.sh
142 $(eval
$(call BuildPackage
,procd
))
143 $(eval
$(call BuildPackage
,procd-ujail
))
144 $(eval
$(call BuildPackage
,procd-seccomp
))
145 $(eval
$(call BuildPackage
,procd-nand
))
146 $(eval
$(call BuildPackage
,procd-nand-firstboot
))