Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [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." |
| 4 | HOMEPAGE = "https://gitorious.org/procps" |
| 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://fix-configure.patch \ |
| 17 | file://sysctl.conf \ |
| 18 | " |
| 19 | |
| 20 | SRC_URI[md5sum] = "1fb7f3f6bf92ce6c5c9ed9949ae858fe" |
| 21 | SRC_URI[sha256sum] = "a02e6f98974dfceab79884df902ca3df30b0e9bad6d76aee0fb5dce17f267f04" |
| 22 | |
| 23 | S = "${WORKDIR}/procps-ng-${PV}" |
| 24 | |
| 25 | EXTRA_OECONF = "--enable-skill --disable-modern-top" |
| 26 | |
| 27 | CPPFLAGS += "-I${S}" |
| 28 | |
| 29 | do_install_append () { |
| 30 | install -d ${D}${base_bindir} |
| 31 | [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done |
| 32 | install -d ${D}${base_sbindir} |
| 33 | [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done |
| 34 | if [ "${base_sbindir}" != "${sbindir}" ]; then |
| 35 | rmdir ${D}${sbindir} |
| 36 | fi |
| 37 | |
| 38 | install -d ${D}${sysconfdir} |
| 39 | install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf |
| 40 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 41 | install -d ${D}${sysconfdir}/sysctl.d |
| 42 | ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf |
| 43 | fi |
| 44 | } |
| 45 | |
| 46 | CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" |
| 47 | |
| 48 | bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime" |
| 49 | base_bindir_progs += "kill pidof ps watch" |
| 50 | base_sbindir_progs += "sysctl" |
| 51 | |
| 52 | ALTERNATIVE_PRIORITY = "100" |
| 53 | |
| 54 | ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}" |
| 55 | |
| 56 | ALTERNATIVE_${PN}-doc = "kill.1 uptime.1" |
| 57 | ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" |
| 58 | ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1" |
| 59 | |
| 60 | python __anonymous() { |
| 61 | for prog in d.getVar('base_bindir_progs', True).split(): |
| 62 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog)) |
| 63 | |
| 64 | for prog in d.getVar('base_sbindir_progs', True).split(): |
| 65 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog)) |
| 66 | } |
| 67 | |