Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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." |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 4 | HOMEPAGE = "https://gitlab.com/procps-ng/procps" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 5 | SECTION = "base" |
| 6 | LICENSE = "GPLv2+ & LGPLv2+" |
| 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 = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \ |
| 16 | file://sysctl.conf \ |
| 17 | " |
| 18 | |
| 19 | SRC_URI[md5sum] = "957e42e8b193490b2111252e4a2b443c" |
| 20 | SRC_URI[sha256sum] = "6ed65ab86318f37904e8f9014415a098bec5bc53653e5d9ab404f95ca5e1a7d4" |
| 21 | |
| 22 | S = "${WORKDIR}/procps-ng-${PV}" |
| 23 | |
| 24 | EXTRA_OECONF = "--enable-skill --disable-modern-top" |
| 25 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 26 | do_install_append () { |
| 27 | install -d ${D}${base_bindir} |
| 28 | [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done |
| 29 | install -d ${D}${base_sbindir} |
| 30 | [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done |
| 31 | if [ "${base_sbindir}" != "${sbindir}" ]; then |
| 32 | rmdir ${D}${sbindir} |
| 33 | fi |
| 34 | |
| 35 | install -d ${D}${sysconfdir} |
| 36 | install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf |
| 37 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 38 | install -d ${D}${sysconfdir}/sysctl.d |
| 39 | ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf |
| 40 | fi |
| 41 | } |
| 42 | |
| 43 | CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" |
| 44 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 45 | bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 46 | base_bindir_progs += "kill pidof ps watch" |
| 47 | base_sbindir_progs += "sysctl" |
| 48 | |
| 49 | ALTERNATIVE_PRIORITY = "200" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 50 | ALTERNATIVE_PRIORITY[pidof] = "150" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 51 | |
| 52 | ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}" |
| 53 | |
| 54 | ALTERNATIVE_${PN}-doc = "kill.1 uptime.1" |
| 55 | ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" |
| 56 | ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1" |
| 57 | |
| 58 | python __anonymous() { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 59 | for prog in d.getVar('base_bindir_progs').split(): |
| 60 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 61 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 62 | for prog in d.getVar('base_sbindir_progs').split(): |
| 63 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog)) |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 64 | } |
| 65 | |