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.

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