Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [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 | |
| 18 | SRC_URI = "http://www.atoptool.nl/download/${BP}.tar.gz \ |
| 19 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://volatiles.atop.conf', 'file://volatiles.99_atop', d)} \ |
| 20 | file://remove-bashisms.patch \ |
| 21 | file://fix-permissions.patch \ |
| 22 | file://sysvinit-implement-status.patch \ |
| 23 | file://0001-add-sys-sysmacros.h-for-major-minor-macros.patch \ |
| 24 | " |
| 25 | SRC_URI[md5sum] = "48e1dbef8c7d826e68829a8d5fc920fc" |
| 26 | SRC_URI[sha256sum] = "73e4725de0bafac8c63b032e8479e2305e3962afbe977ec1abd45f9e104eb264" |
| 27 | |
| 28 | do_compile() { |
| 29 | oe_runmake all |
| 30 | } |
| 31 | |
| 32 | do_install() { |
| 33 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 34 | make DESTDIR=${D} VERS=${PV} SYSDPATH=${systemd_system_unitdir} \ |
| 35 | PMPATHD=${systemd_unitdir}/system-sleep systemdinstall |
| 36 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 37 | install -m 644 ${WORKDIR}/volatiles.atop.conf ${D}${sysconfdir}/tmpfiles.d/atop.conf |
| 38 | rm -f ${D}${systemd_system_unitdir}/atopacct.service |
| 39 | else |
| 40 | make DESTDIR=${D} VERS=${PV} sysvinstall |
| 41 | install -d ${D}${sysconfdir}/default/volatiles |
| 42 | install -m 644 ${WORKDIR}/volatiles.99_atop ${D}${sysconfdir}/default/volatiles/99_atop |
| 43 | rm -f ${D}${sysconfdir}/init.d/atopacct |
| 44 | fi |
| 45 | |
| 46 | # remove atopacct related files |
| 47 | rm -rf ${D}${sbindir} ${D}${mandir}/man8 |
| 48 | } |
| 49 | |
| 50 | inherit systemd |
| 51 | |
| 52 | SYSTEMD_SERVICE_${PN} = "atop.service" |
| 53 | SYSTEMD_AUTO_ENABLE = "disable" |
| 54 | |
| 55 | FILES_${PN} += "${systemd_unitdir}/system-sleep" |
| 56 | |
| 57 | RDEPENDS_${PN} = "procps" |