diff options
| author | Kai Kang <kai.kang@windriver.com> | 2016-01-26 14:16:36 +0800 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-02-01 15:58:06 +0100 |
| commit | 05960f3299f18f394bdf829e52b1b5c0c5ebbe5f (patch) | |
| tree | 92ea81021895e93c2445c1ac9bde79e5dac30a36 /meta-oe/recipes-support/atop/atop_2.2.3.bb | |
| parent | 668468d59ce1553c60d729d6f37ddda517b2997f (diff) | |
| download | meta-openembedded-05960f3299f18f394bdf829e52b1b5c0c5ebbe5f.tar.gz | |
atop: add recipe
Add recipe for atop.
* remove bashisms for scripts
* fix permissions for executable files
* create volatile directory /var/volatile/log/atop
* implement status command in sysvinit script
* drop atopacctd which is excluded from most distribution such as Ubuntu
and Fedora
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/atop/atop_2.2.3.bb')
| -rw-r--r-- | meta-oe/recipes-support/atop/atop_2.2.3.bb | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/atop/atop_2.2.3.bb b/meta-oe/recipes-support/atop/atop_2.2.3.bb new file mode 100644 index 0000000000..21311e3540 --- /dev/null +++ b/meta-oe/recipes-support/atop/atop_2.2.3.bb | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | SUMMARY = "Monitor for system resources and process activity" | ||
| 2 | DESCRIPTION = "Atop is an ASCII full-screen performance monitor for Linux that \ | ||
| 3 | is capable of reporting the activity of all processes (even if processes have \ | ||
| 4 | finished during the interval), daily logging of system and process activity for \ | ||
| 5 | long-term analysis, highlighting overloaded system resources by using colors, \ | ||
| 6 | etc. At regular intervals, it shows system-level activity related to the CPU, \ | ||
| 7 | memory, swap, disks (including LVM) and network layers, and for every process \ | ||
| 8 | (and thread) it shows e.g. the CPU utilization, memory growth, disk \ | ||
| 9 | utilization, priority, username, state, and exit code." | ||
| 10 | HOMEPAGE = "http://www.atoptool.nl" | ||
| 11 | SECTION = "console/utils" | ||
| 12 | |||
| 13 | LICENSE = "GPLv2" | ||
| 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
| 15 | |||
| 16 | DEPENDS = "ncurses zlib" | ||
| 17 | |||
| 18 | ATOP_VER = "${@'-'.join(d.getVar('PV', True).rsplit('.', 1))}" | ||
| 19 | |||
| 20 | SRC_URI = " \ | ||
| 21 | http://www.atoptool.nl/download/${BPN}-${ATOP_VER}.tar.gz \ | ||
| 22 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://volatiles.atop.conf', 'file://volatiles.99_atop', d)} \ | ||
| 23 | file://remove-bashisms.patch \ | ||
| 24 | file://fix-permissions.patch \ | ||
| 25 | file://sysvinit-implement-status.patch \ | ||
| 26 | " | ||
| 27 | |||
| 28 | SRC_URI[md5sum] = "034dc1544f2ec4e4d2c739d320dc326d" | ||
| 29 | SRC_URI[sha256sum] = "c785b8a2355be28b3de6b58a8ea4c4fcab8fadeaa57a99afeb03c66fac8e055d" | ||
| 30 | |||
| 31 | S = "${WORKDIR}/${BPN}-${ATOP_VER}" | ||
| 32 | |||
| 33 | do_compile() { | ||
| 34 | oe_runmake all | ||
| 35 | } | ||
| 36 | |||
| 37 | do_install() { | ||
| 38 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 39 | make DESTDIR=${D} VERS=${ATOP_VER} SYSDPATH=${systemd_system_unitdir} \ | ||
| 40 | PMPATHD=${systemd_unitdir}/system-sleep systemdinstall | ||
| 41 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
| 42 | install -m 644 ${WORKDIR}/volatiles.atop.conf ${D}${sysconfdir}/tmpfiles.d/atop.conf | ||
| 43 | rm -f ${D}${systemd_system_unitdir}/atopacct.service | ||
| 44 | else | ||
| 45 | make DESTDIR=${D} VERS=${ATOP_VER} sysvinstall | ||
| 46 | install -d ${D}${sysconfdir}/default/volatiles | ||
| 47 | install -m 644 ${WORKDIR}/volatiles.99_atop ${D}${sysconfdir}/default/volatiles/99_atop | ||
| 48 | rm -f ${D}${sysconfdir}/init.d/atopacct | ||
| 49 | fi | ||
| 50 | |||
| 51 | # remove atopacct related files | ||
| 52 | rm -rf ${D}${sbindir} ${D}${mandir}/man8 | ||
| 53 | } | ||
| 54 | |||
| 55 | inherit systemd | ||
| 56 | |||
| 57 | SYSTEMD_SERVICE_${PN} = "atop.service" | ||
| 58 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 59 | |||
| 60 | FILES_${PN} += "${systemd_unitdir}/system-sleep" | ||
| 61 | |||
| 62 | RDEPENDS_${PN} = "procps" | ||
