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.

86 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2006-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:=procps
  9. PKG_VERSION:=3.2.8
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_LICENSE_FILES:=COPYING COPYING.LIB
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=http://procps.sourceforge.net
  15. PKG_MD5SUM:=9532714b6846013ca9898984ba4cd7e0
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. PROCPS_APPLETS := \
  19. ps free pgrep pkill pmap pwdx skill w \
  20. slabtop snice tload top vmstat watch
  21. define Package/procps/Default
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. DEPENDS:=+libncurses
  25. TITLE:=proc utilities
  26. URL:=http://procps.sourceforge.net/
  27. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  28. endef
  29. define Package/procps
  30. $(call Package/procps/Default)
  31. MENU:=1
  32. endef
  33. define Package/procps/description
  34. procps is the package that has a bunch of small useful utilities that give
  35. information about processes using the /proc filesystem. The package
  36. includes the programs ps, top, vmstat, w, kill, free, slabtop, and skill.
  37. endef
  38. define GenPlugin
  39. define Package/$(1)
  40. $(call Package/procps/Default)
  41. DEPENDS:=procps
  42. TITLE:=Applet $(2) from the procps package
  43. DEFAULT:=y
  44. endef
  45. define Package/$(1)/description
  46. Installs the applet $(2).
  47. endef
  48. endef
  49. $(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-$(a),$(a))))
  50. MAKE_FLAGS += \
  51. CFLAGS="$(TARGET_CFLAGS)" \
  52. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  53. LDFLAGS="$(TARGET_LDFLAGS)" \
  54. define Package/procps/install
  55. $(INSTALL_DIR) $(1)/usr/bin
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/proc/libproc-$(PKG_VERSION).so $(1)/usr/lib/
  58. endef
  59. AUXDIR_ps := "ps/"
  60. define BuildPlugin
  61. define Package/$(1)/install
  62. $(INSTALL_DIR) $$(1)/usr/bin
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(AUXDIR_$(2))$(2) $$(1)/usr/bin/
  64. endef
  65. $$(eval $$(call BuildPackage,$(1)))
  66. endef
  67. $(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-$(a),$(a))))
  68. $(eval $(call BuildPackage,procps))