You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.7 KiB

  1. #
  2. # Copyright (C) 2006-2015 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:=procps-ng
  9. PKG_VERSION:=3.3.11
  10. PKG_RELEASE:=2
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_LICENSE_FILES:=COPYING COPYING.LIB
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_URL:=https://gitlab.com/procps-ng/procps.git
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_SOURCE_VERSION:=8a198e3eafbde0b627e9992b41d26e6762e4f8c7
  17. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. PKG_FIXUP:=autoreconf
  21. include $(INCLUDE_DIR)/package.mk
  22. CONFIGURE_ARGS += --enable-skill
  23. PROCPS_APPLETS := \
  24. free kill pgrep pkill pmap ps pwdx skill slabtop \
  25. snice tload top uptime vmstat w watch
  26. define Package/procps-ng/Default
  27. SECTION:=utils
  28. CATEGORY:=Utilities
  29. DEPENDS:=+libncurses
  30. TITLE:=procps-ng utilities
  31. URL:=https://gitlab.com/procps-ng/procps
  32. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  33. endef
  34. define Build/Prepare
  35. $(call Build/Prepare/Default)
  36. echo "$(PKG_VERSION)" > "$(PKG_BUILD_DIR)/.tarball-version"
  37. endef
  38. define Package/procps-ng
  39. $(call Package/procps-ng/Default)
  40. MENU:=1
  41. endef
  42. define Package/procps-ng/description
  43. procps is a set of command line and full-screen utilities that provide information out of the pseudo-filesystem
  44. most commonly located at /proc. This filesystem provides a simple interface to the kernel data structures.
  45. The programs of procps generally concentrate on the structures that describe the processess running on the system.
  46. NOTE: some utilities provided by procps-ng packages (ps, uptime, kill, ...) are installed as busybox applets, by default.
  47. Conflicting applets should be removed from the build to avoid file conflicts.
  48. endef
  49. define GenPlugin
  50. define Package/$(1)
  51. $(call Package/procps-ng/Default)
  52. DEPENDS:=procps-ng
  53. TITLE:=Applet $(2) from the procps-ng package
  54. DEFAULT:=y
  55. endef
  56. define Package/$(1)/description
  57. Installs the applet $(2).
  58. endef
  59. endef
  60. $(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-ng-$(a),$(a))))
  61. MAKE_FLAGS += \
  62. CFLAGS="$(TARGET_CFLAGS)" \
  63. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  64. LDFLAGS="$(TARGET_LDFLAGS)" \
  65. define Package/procps-ng/install
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/
  69. endef
  70. define BuildPlugin
  71. define Package/$(1)/install
  72. $(INSTALL_DIR) $$(1)/usr/bin
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/
  74. endef
  75. $$(eval $$(call BuildPackage,$(1)))
  76. endef
  77. $(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-ng-$(a),$(a))))
  78. $(eval $(call BuildPackage,procps-ng))