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
:=22870d6feb2478adb617ce4f09a787addaf2d260c5a8aa7b17d889a962c5e42e
19 PKG_LICENSE
:=GPL-2.0
-or-later
20 PKG_LICENSE_FILES
:=COPYING COPYING.LIB
21 PKG_CPE_ID
:=cpe
:/a
:procps-ng_project
:procps-ng
27 include $(INCLUDE_DIR
)/package.mk
29 CONFIGURE_ARGS
+= --enable-skill
31 # most of these have alternatives provided by busybox applets
33 free kill pgrep pkill pmap ps pwdx skill slabtop \
34 snice sysctl tload top uptime vmstat w watch
36 # procps-ng will be configured with "--bindir=/usr/bin --sbindir=/usr/sbin" and
37 # as such executables will be installed there by default, but some of them need
38 # to reside in locations such as /bin and /sbin to be in accordance with
39 # busybox alternatives which is also other distributions like debian and centos
41 PROCPS_APPLETS_SRC_DIR_SBIN
:=sysctl
42 procps-applets-src-dir
=$(if
$(filter $(PROCPS_APPLETS_SRC_DIR_SBIN
),$(1)),/usr
/sbin
,/usr
/bin
)
44 PROCPS_APPLETS_DIR_BIN
:=kill ps watch
45 PROCPS_APPLETS_DIR_SBIN
:=sysctl
46 procps-applets-dir
=$(if
$(filter $(PROCPS_APPLETS_DIR_BIN
),$(1)),/bin
,$(if
$(filter $(PROCPS_APPLETS_DIR_SBIN
),$(1)),/sbin
,/usr
/bin
))
48 define Package
/procps-ng
/Default
52 TITLE
:=procps-ng utilities
53 URL
:=https
://gitlab.com
/procps-ng
/procps
57 $(call Build
/Prepare
/Default
)
58 echo
"$(PKG_VERSION)" > "$(PKG_BUILD_DIR)/.tarball-version"
61 define Package
/procps-ng
62 $(call Package
/procps-ng
/Default
)
66 define Package
/procps-ng
/description
67 procps is a set of command line and full-screen utilities that provide information out of the pseudo-filesystem
68 most commonly located at
/proc. This filesystem provides a simple interface to the kernel data structures.
69 The programs of procps generally concentrate on the structures that describe the processess running on the system.
71 NOTE
: some utilities provided by procps-ng packages
(ps
, uptime
, kill
, ...
) are installed
as busybox applets
, by default.
72 Conflicting applets should be removed from the build to avoid file conflicts.
76 define Package
/procps-ng-
$(1)
77 $(call Package
/procps-ng
/Default
)
79 TITLE
:=Applet
$(1) from the procps-ng package
80 ALTERNATIVES
:=200:$(2)/$(1):/usr
/libexec
/$(1)-procps-ng
83 define Package
/procps-ng-
$(1)/description
84 Installs the applet
$(1).
88 $(foreach a
,$(PROCPS_APPLETS
),$(eval
$(call GenPlugin
,$(a
),$(call procps-applets-dir
,$(a
)))))
91 CFLAGS
="$(TARGET_CFLAGS)" \
92 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
93 LDFLAGS
="$(TARGET_LDFLAGS)" \
95 define Package
/procps-ng
/install
96 $(INSTALL_DIR
) $(1)/usr
/lib
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libproc2.so
* $(1)/usr
/lib
/
100 define Build
/InstallDev
101 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
102 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
103 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/* $(1)/usr
/lib
/
107 define Package
/procps-ng-
$(1)/install
108 $(INSTALL_DIR
) $$(1)/usr
/libexec
109 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)$(2)/$(1) $$(1)/usr
/libexec
/$(1)-procps-ng
112 $$(eval
$$(call BuildPackage
,procps-ng-
$(1)))
115 $(foreach a
,$(PROCPS_APPLETS
),$(eval
$(call BuildPlugin
,$(a
),$(call procps-applets-src-dir
,$(a
)))))
116 $(eval
$(call BuildPackage
,procps-ng
))