diff options
Diffstat (limited to 'meta/recipes-extended/procps/procps_4.0.4.bb')
-rw-r--r-- | meta/recipes-extended/procps/procps_4.0.4.bb | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/meta/recipes-extended/procps/procps_4.0.4.bb b/meta/recipes-extended/procps/procps_4.0.4.bb new file mode 100644 index 0000000000..789e0c2747 --- /dev/null +++ b/meta/recipes-extended/procps/procps_4.0.4.bb | |||
@@ -0,0 +1,97 @@ | |||
1 | SUMMARY = "System and process monitoring utilities" | ||
2 | DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \ | ||
3 | the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill." | ||
4 | HOMEPAGE = "https://gitlab.com/procps-ng/procps" | ||
5 | SECTION = "base" | ||
6 | LICENSE = "GPL-2.0-or-later & LGPL-2.0-or-later" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
8 | file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ | ||
9 | " | ||
10 | |||
11 | DEPENDS = "ncurses" | ||
12 | |||
13 | inherit autotools gettext pkgconfig update-alternatives | ||
14 | |||
15 | SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master \ | ||
16 | file://sysctl.conf \ | ||
17 | " | ||
18 | SRCREV = "4ddcef2fd843170c8e2d59a83042978f41037a2b" | ||
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | # Upstream has a custom autogen.sh which invokes po/update-potfiles as they | ||
23 | # don't ship a po/POTFILES.in (which is silly). Without that file gettext | ||
24 | # doesn't believe po/ is a gettext directory and won't generate po/Makefile. | ||
25 | do_configure:prepend() { | ||
26 | ( cd ${S} && po/update-potfiles ) | ||
27 | } | ||
28 | |||
29 | EXTRA_OECONF = "--enable-skill --disable-modern-top" | ||
30 | |||
31 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
32 | PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" | ||
33 | |||
34 | do_install:append () { | ||
35 | install -d ${D}${base_bindir} | ||
36 | [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done | ||
37 | install -d ${D}${base_sbindir} | ||
38 | [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done | ||
39 | if [ "${base_sbindir}" != "${sbindir}" ]; then | ||
40 | rmdir ${D}${sbindir} | ||
41 | fi | ||
42 | |||
43 | install -d ${D}${sysconfdir} | ||
44 | install -m 0644 ${UNPACKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf | ||
45 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
46 | install -d ${D}${sysconfdir}/sysctl.d | ||
47 | ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf | ||
48 | fi | ||
49 | } | ||
50 | |||
51 | CONFFILES:${PN} = "${sysconfdir}/sysctl.conf" | ||
52 | |||
53 | bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w" | ||
54 | base_bindir_progs += "kill pidof ps watch" | ||
55 | base_sbindir_progs += "sysctl" | ||
56 | |||
57 | ALTERNATIVE_PRIORITY = "200" | ||
58 | ALTERNATIVE_PRIORITY[pidof] = "150" | ||
59 | |||
60 | ALTERNATIVE:${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}" | ||
61 | |||
62 | ALTERNATIVE:${PN}-doc = "kill.1 uptime.1" | ||
63 | ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" | ||
64 | ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1" | ||
65 | |||
66 | python __anonymous() { | ||
67 | for prog in d.getVar('base_bindir_progs').split(): | ||
68 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) | ||
69 | |||
70 | for prog in d.getVar('base_sbindir_progs').split(): | ||
71 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog)) | ||
72 | } | ||
73 | |||
74 | PROCPS_PACKAGES = "${PN}-lib \ | ||
75 | ${PN}-ps \ | ||
76 | ${PN}-sysctl" | ||
77 | |||
78 | PACKAGE_BEFORE_PN = "${PROCPS_PACKAGES}" | ||
79 | RDEPENDS:${PN} += "${PROCPS_PACKAGES}" | ||
80 | |||
81 | RDEPENDS:${PN}-ps += "${PN}-lib" | ||
82 | RDEPENDS:${PN}-sysctl += "${PN}-lib" | ||
83 | |||
84 | FILES:${PN}-lib = "${libdir}" | ||
85 | FILES:${PN}-ps = "${base_bindir}/ps.${BPN}" | ||
86 | FILES:${PN}-sysctl = "${base_sbindir}/sysctl.${BPN} ${sysconfdir}/sysctl.conf ${sysconfdir}/sysctl.d" | ||
87 | |||
88 | ALTERNATIVE:${PN}:remove = "ps" | ||
89 | ALTERNATIVE:${PN}:remove = "sysctl" | ||
90 | |||
91 | ALTERNATIVE:${PN}-ps = "ps" | ||
92 | ALTERNATIVE_TARGET[ps] = "${base_bindir}/ps" | ||
93 | ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps" | ||
94 | |||
95 | ALTERNATIVE:${PN}-sysctl = "sysctl" | ||
96 | ALTERNATIVE_TARGET[sysctl] = "${base_sbindir}/sysctl" | ||
97 | ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" | ||