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.

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