Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #
  2. # Copyright (C) 2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=procd
  9. PKG_VERSION:=2014-11-05
  10. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=git://nbd.name/luci2/procd.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=6f52ef3cc9f01e952e7f32d10c7f8612e635e80c
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. CMAKE_INSTALL:=1
  17. PKG_LICENSE:=GPL-2.0
  18. PKG_LICENSE_FILES:=
  19. PKG_MAINTAINER:=John Crispin <[email protected]>
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. TARGET_LDFLAGS += $(if $(CONFIG_USE_EGLIBC),-lrt)
  23. define Package/procd
  24. SECTION:=base
  25. CATEGORY:=Base system
  26. DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_EGLIBC:librt +libubox +libubus +NAND_SUPPORT:procd-nand
  27. TITLE:=OpenWrt system process manager
  28. endef
  29. define Package/procd-nand
  30. SECTION:=utils
  31. CATEGORY:=Utilities
  32. DEPENDS:=@NAND_SUPPORT +ubi-utils
  33. TITLE:=OpenWrt sysupgrade nand helper
  34. endef
  35. define Package/procd/config
  36. menu "Configuration"
  37. depends on PACKAGE_procd
  38. config PROCD_SHOW_BOOT
  39. bool
  40. default n
  41. prompt "Print the shutdown to the console as well as logging it to syslog"
  42. endmenu
  43. endef
  44. PKG_CONFIG_DEPENDS:= PROCD_SHOW_BOOT
  45. ifeq ($(CONFIG_PACKAGE_PROCD_SHOW_BOOT),y)
  46. CMAKE_OPTIONS += -DSHOW_BOOT_ON_CONSOLE
  47. endif
  48. define Package/procd/install
  49. $(INSTALL_DIR) $(1)/sbin $(1)/etc $(1)/lib/functions
  50. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{init,procd,askfirst,udevtrigger} $(1)/sbin/
  51. $(INSTALL_BIN) ./files/reload_config $(1)/sbin/
  52. $(INSTALL_DATA) ./files/hotplug*.json $(1)/etc/
  53. $(INSTALL_DATA) ./files/procd.sh $(1)/lib/functions/
  54. endef
  55. define Package/procd-nand/install
  56. $(INSTALL_DIR) $(1)/sbin $(1)/lib/upgrade
  57. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/upgraded $(1)/sbin/
  58. $(INSTALL_DATA) ./files/nand.sh $(1)/lib/upgrade/
  59. endef
  60. $(eval $(call BuildPackage,procd))
  61. $(eval $(call BuildPackage,procd-nand))