+define Package/procd-jail
+ SECTION:=base
+ CATEGORY:=Base system
+ DEPENDS:=procd +@KERNEL_NAMESPACES +@KERNEL_UTS_NS +@KERNEL_IPC_NS +@KERNEL_PID_NS @PROCD_JAIL_SUPPORT
+ TITLE:=OpenWrt process jail
+ DEFAULT:=n
+endef
+
+define Package/procd-nand
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=@NAND_SUPPORT +ubi-utils
+ TITLE:=OpenWrt sysupgrade nand helper
+endef
+
+define Package/procd-nand-firstboot
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=procd-nand
+ TITLE:=OpenWrt firstboot nand helper
+endef
+
+define Package/procd/config
+menu "Configuration"
+ depends on PACKAGE_procd
+
+config PROCD_SHOW_BOOT
+ bool
+ default n
+ prompt "Print the shutdown to the console as well as logging it to syslog"
+
+config PROCD_ZRAM_TMPFS
+ bool
+ default n
+ prompt "Mount /tmp using zram."
+
+config PROCD_JAIL_SUPPORT
+ bool
+ default y
+ depends on (arm || armeb || mips || mipsel || i386 || x86_64) && PROCD_SECCOMP_SUPPORT
+
+config PROCD_SECCOMP_SUPPORT
+ bool
+ default y
+ depends on (arm || armeb || mips || mipsel || i386 || x86_64) && !TARGET_uml && @KERNEL_SECCOMP
+endmenu
+endef
+
+
+ifeq ($(CONFIG_NAND_SUPPORT),y)
+ CMAKE_OPTIONS += -DBUILD_UPGRADED=1
+endif
+
+ifeq ($(CONFIG_PROCD_SHOW_BOOT),y)
+ CMAKE_OPTIONS += -DSHOW_BOOT_ON_CONSOLE=1
+endif
+
+ifeq ($(CONFIG_PROCD_ZRAM_TMPFS),y)
+ CMAKE_OPTIONS += -DZRAM_TMPFS=1
+endif
+
+ifeq ($(CONFIG_PROCD_JAIL_SUPPORT),y)
+ CMAKE_OPTIONS += -DJAIL_SUPPORT=1
+endif
+
+ifeq ($(CONFIG_PROCD_SECCOMP_SUPPORT),y)
+ CMAKE_OPTIONS += -DSECCOMP_SUPPORT=1
+endif
+