Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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-07-02
  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:=619ec82ececcbe9b9d1ca18ac6bc7c5c68c96825
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. CMAKE_INSTALL:=1
  17. PKG_LICENSE:=GPLv2
  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/install
  36. $(INSTALL_DIR) $(1)/sbin $(1)/etc $(1)/lib/functions
  37. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/{init,procd,askfirst,udevtrigger} $(1)/sbin/
  38. $(INSTALL_BIN) ./files/reload_config $(1)/sbin/
  39. $(INSTALL_DATA) ./files/hotplug*.json $(1)/etc/
  40. $(INSTALL_DATA) ./files/procd.sh $(1)/lib/functions/
  41. endef
  42. define Package/procd-nand/install
  43. $(INSTALL_DIR) $(1)/sbin $(1)/lib/upgrade
  44. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/upgraded $(1)/sbin/
  45. $(INSTALL_DATA) ./files/nand.sh $(1)/lib/upgrade/
  46. endef
  47. $(eval $(call BuildPackage,procd))
  48. $(eval $(call BuildPackage,procd-nand))