Branch oldpackages for 14.07
[14.07/packages.git] / utils / procps / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=procps
11 PKG_VERSION:=3.2.8
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://procps.sourceforge.net
16 PKG_MD5SUM:=9532714b6846013ca9898984ba4cd7e0
17
18 PKG_BUILD_PARALLEL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 PROCPS_APPLETS := \
23     ps free pgrep pkill pmap pwdx skill w \
24     slabtop snice tload top vmstat watch
25
26 define Package/procps/Default
27   SECTION:=utils
28   CATEGORY:=Utilities
29   DEPENDS:=+libncurses
30   TITLE:=proc utilities
31   URL:=http://procps.sourceforge.net/
32 endef
33
34 define Package/procps
35   $(call Package/procps/Default)
36   MENU:=1
37 endef
38
39 define Package/procps/description
40  procps is the package that has a bunch of small useful utilities that give
41  information about processes using the /proc filesystem. The package
42  includes the programs ps, top, vmstat, w, kill, free, slabtop, and skill.
43 endef
44
45 define GenPlugin
46  define Package/$(1)
47    $(call Package/procps/Default)
48    DEPENDS:=procps
49    TITLE:=Applet $(2) from the procps package
50    DEFAULT:=y
51  endef
52
53  define Package/$(1)/description
54   Installs the applet $(2).
55  endef
56 endef
57
58 $(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-$(a),$(a))))
59
60 MAKE_FLAGS += \
61         CFLAGS="$(TARGET_CFLAGS)" \
62         CPPFLAGS="$(TARGET_CPPFLAGS)" \
63         LDFLAGS="$(TARGET_LDFLAGS)" \
64
65 define Package/procps/install
66         $(INSTALL_DIR) $(1)/usr/bin
67         $(INSTALL_DIR) $(1)/usr/lib
68         $(INSTALL_BIN) $(PKG_BUILD_DIR)/proc/libproc-$(PKG_VERSION).so $(1)/usr/lib/
69 endef
70
71 AUXDIR_ps := "ps/"
72
73 define BuildPlugin
74   define Package/$(1)/install
75         $(INSTALL_DIR) $$(1)/usr/bin
76         $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(AUXDIR_$(2))$(2) $$(1)/usr/bin/
77   endef
78
79   $$(eval $$(call BuildPackage,$(1)))
80 endef
81
82 $(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-$(a),$(a))))
83 $(eval $(call BuildPackage,procps))