2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=@SF
/procps-ng
16 PKG_HASH
:=925eacd65dedcf9c98eb94e8978bbfb63f5de37294cc1047d81462ed477a20af
19 PKG_LICENSE
:=GPL-2.0
-or-later
20 PKG_LICENSE_FILES
:=COPYING COPYING.LIB
26 include $(INCLUDE_DIR
)/package.mk
28 CONFIGURE_ARGS
+= --enable-skill
30 # most of these have alternatives provided by busybox applets
32 free kill pgrep pkill pmap ps pwdx skill slabtop \
33 snice sysctl tload top uptime vmstat w watch
35 # procps-ng will be configured with "--bindir=/usr/bin --sbindir=/usr/sbin" and
36 # as such executables will be installed there by default, but some of them need
37 # to reside in locations such as /bin and /sbin to be in accordance with
38 # busybox alternatives which is also other distributions like debian and centos
40 PROCPS_APPLETS_SRC_DIR_SBIN
:=sysctl
41 procps-applets-src-dir
=$(if
$(filter $(PROCPS_APPLETS_SRC_DIR_SBIN
),$(1)),/usr
/sbin
,/usr
/bin
)
43 PROCPS_APPLETS_DIR_BIN
:=kill ps watch
44 PROCPS_APPLETS_DIR_SBIN
:=sysctl
45 procps-applets-dir
=$(if
$(filter $(PROCPS_APPLETS_DIR_BIN
),$(1)),/bin
,$(if
$(filter $(PROCPS_APPLETS_DIR_SBIN
),$(1)),/sbin
,/usr
/bin
))
47 define Package
/procps-ng
/Default
51 TITLE
:=procps-ng utilities
52 URL
:=https
://gitlab.com
/procps-ng
/procps
56 $(call Build
/Prepare
/Default
)
57 echo
"$(PKG_VERSION)" > "$(PKG_BUILD_DIR)/.tarball-version"
60 define Package
/procps-ng
61 $(call Package
/procps-ng
/Default
)
65 define Package
/procps-ng
/description
66 procps is a set of command line and full-screen utilities that provide information out of the pseudo-filesystem
67 most commonly located at
/proc. This filesystem provides a simple interface to the kernel data structures.
68 The programs of procps generally concentrate on the structures that describe the processess running on the system.
70 NOTE
: some utilities provided by procps-ng packages
(ps
, uptime
, kill
, ...
) are installed
as busybox applets
, by default.
71 Conflicting applets should be removed from the build to avoid file conflicts.
75 define Package
/procps-ng-
$(1)
76 $(call Package
/procps-ng
/Default
)
78 TITLE
:=Applet
$(1) from the procps-ng package
79 ALTERNATIVES
:=200:$(2)/$(1):/usr
/libexec
/$(1)-procps-ng
82 define Package
/procps-ng-
$(1)/description
83 Installs the applet
$(1).
87 $(foreach a
,$(PROCPS_APPLETS
),$(eval
$(call GenPlugin
,$(a
),$(call procps-applets-dir
,$(a
)))))
90 CFLAGS
="$(TARGET_CFLAGS)" \
91 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
92 LDFLAGS
="$(TARGET_LDFLAGS)" \
94 define Package
/procps-ng
/install
95 $(INSTALL_DIR
) $(1)/usr
/lib
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libprocps.so
* $(1)/usr
/lib
/
99 define Build
/InstallDev
100 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
101 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
102 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/* $(1)/usr
/lib
/
106 define Package
/procps-ng-
$(1)/install
107 $(INSTALL_DIR
) $$(1)/usr
/libexec
108 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)$(2)/$(1) $$(1)/usr
/libexec
/$(1)-procps-ng
111 $$(eval
$$(call BuildPackage
,procps-ng-
$(1)))
114 $(foreach a
,$(PROCPS_APPLETS
),$(eval
$(call BuildPlugin
,$(a
),$(call procps-applets-src-dir
,$(a
)))))
115 $(eval
$(call BuildPackage
,procps-ng
))