blob: dcfaba71f2ec07202f9dee7f6cb47009ae59b52a [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "System and process monitoring utilities"
2DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
3the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
4HOMEPAGE = "https://gitorious.org/procps"
5SECTION = "base"
6LICENSE = "GPLv2+ & LGPLv2+"
7LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \
9 "
10
11DEPENDS = "ncurses"
12
13inherit autotools gettext pkgconfig update-alternatives
14
15SRC_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
20SRC_URI[md5sum] = "1fb7f3f6bf92ce6c5c9ed9949ae858fe"
21SRC_URI[sha256sum] = "a02e6f98974dfceab79884df902ca3df30b0e9bad6d76aee0fb5dce17f267f04"
22
23S = "${WORKDIR}/procps-ng-${PV}"
24
25EXTRA_OECONF = "--enable-skill --disable-modern-top"
26
27CPPFLAGS += "-I${S}"
28
29do_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
46CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
47
48bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
49base_bindir_progs += "kill pidof ps watch"
50base_sbindir_progs += "sysctl"
51
52ALTERNATIVE_PRIORITY = "100"
53
54ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
55
56ALTERNATIVE_${PN}-doc = "kill.1 uptime.1"
57ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
58ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
59
60python __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