Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 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 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 18 | ATOP_VER = "${@'-'.join(d.getVar('PV').rsplit('.', 1))}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 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)} \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 23 | file://0001-include-missing-header-files.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 24 | file://remove-bashisms.patch \ |
| 25 | file://fix-permissions.patch \ |
| 26 | file://sysvinit-implement-status.patch \ |
| 27 | " |
| 28 | |
| 29 | SRC_URI[md5sum] = "034dc1544f2ec4e4d2c739d320dc326d" |
| 30 | SRC_URI[sha256sum] = "c785b8a2355be28b3de6b58a8ea4c4fcab8fadeaa57a99afeb03c66fac8e055d" |
| 31 | |
| 32 | S = "${WORKDIR}/${BPN}-${ATOP_VER}" |
| 33 | |
| 34 | do_compile() { |
| 35 | oe_runmake all |
| 36 | } |
| 37 | |
| 38 | do_install() { |
| 39 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 40 | make DESTDIR=${D} VERS=${ATOP_VER} SYSDPATH=${systemd_system_unitdir} \ |
| 41 | PMPATHD=${systemd_unitdir}/system-sleep systemdinstall |
| 42 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 43 | install -m 644 ${WORKDIR}/volatiles.atop.conf ${D}${sysconfdir}/tmpfiles.d/atop.conf |
| 44 | rm -f ${D}${systemd_system_unitdir}/atopacct.service |
| 45 | else |
| 46 | make DESTDIR=${D} VERS=${ATOP_VER} sysvinstall |
| 47 | install -d ${D}${sysconfdir}/default/volatiles |
| 48 | install -m 644 ${WORKDIR}/volatiles.99_atop ${D}${sysconfdir}/default/volatiles/99_atop |
| 49 | rm -f ${D}${sysconfdir}/init.d/atopacct |
| 50 | fi |
| 51 | |
| 52 | # remove atopacct related files |
| 53 | rm -rf ${D}${sbindir} ${D}${mandir}/man8 |
| 54 | } |
| 55 | |
| 56 | inherit systemd |
| 57 | |
| 58 | SYSTEMD_SERVICE_${PN} = "atop.service" |
| 59 | SYSTEMD_AUTO_ENABLE = "disable" |
| 60 | |
| 61 | FILES_${PN} += "${systemd_unitdir}/system-sleep" |
| 62 | |
| 63 | RDEPENDS_${PN} = "procps" |