Files
Jörg Sommer 174ab7dff1 atop: Fix binmerge
In case $sbindir = $bindir we have to pass this setting to make install.

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-04-12 16:42:05 -07:00

70 lines
2.9 KiB
BlitzBasic

SUMMARY = "Monitor for system resources and process activity"
DESCRIPTION = "Atop is an ASCII full-screen performance monitor for Linux that \
is capable of reporting the activity of all processes (even if processes have \
finished during the interval), daily logging of system and process activity for \
long-term analysis, highlighting overloaded system resources by using colors, \
etc. At regular intervals, it shows system-level activity related to the CPU, \
memory, swap, disks (including LVM) and network layers, and for every process \
(and thread) it shows e.g. the CPU utilization, memory growth, disk \
utilization, priority, username, state, and exit code."
HOMEPAGE = "https://www.atoptool.nl"
SECTION = "console/utils"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
inherit pkgconfig
DEPENDS = "ncurses zlib glib-2.0"
SRC_URI = "http://www.atoptool.nl/download/${BP}.tar.gz \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://volatiles.atop.conf', 'file://volatiles.99_atop', d)} \
file://fix-permissions.patch \
file://sysvinit-implement-status.patch \
"
SRC_URI[sha256sum] = "4fdbe67c5dfaf89405639e18599f4eae77978073ffa54f3c78c368ab54bd12f6"
UPSTREAM_CHECK_URI = "https://atoptool.nl/downloadatop.php"
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+).tar"
CVE_STATUS[CVE-2011-3618] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions."
TARGET_CC_ARCH += "${LDFLAGS}"
do_compile() {
oe_runmake all
}
do_install() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
make DESTDIR=${D} VERS=${PV} SYSDPATH=${systemd_system_unitdir} \
PMPATHD=${systemd_unitdir}/system-sleep SBINPATH=${sbindir} install
install -d ${D}${sysconfdir}/tmpfiles.d
install -m 644 ${UNPACKDIR}/volatiles.atop.conf ${D}${sysconfdir}/tmpfiles.d/atop.conf
rm -f ${D}${systemd_system_unitdir}/atopacct.service
else
make DESTDIR=${D} VERS=${PV} sysvinstall
install -d ${D}${sysconfdir}/default/volatiles
install -m 644 ${UNPACKDIR}/volatiles.99_atop ${D}${sysconfdir}/default/volatiles/99_atop
rm -f ${D}${sysconfdir}/init.d/atopacct
fi
# /var/log/atop will be created in runtime
rm -rf ${D}${localstatedir}/log
rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
}
inherit systemd
PACKAGES =+ "${PN}-acctd ${PN}-gpud"
SYSTEMD_SERVICE:${PN} = "atop.service atopgpu.service atop-rotate.service"
SYSTEMD_AUTO_ENABLE = "disable"
FILES:${PN} += "${systemd_unitdir}/system-sleep ${systemd_system_unitdir}/atop-rotate.timer"
FILES:${PN}-acctd += "${sbindir}/atopacctd ${mandir}/man8/atopacctd.8"
FILES:${PN}-gpud += "${sbindir}/atopgpud ${mandir}/man8/atopgpud.8"
RDEPENDS:${PN} = "procps"
RDEPENDS:${PN}-gpud = "python3-core"
RRECOMMENDS:${PN} = "${PN}-acctd ${PN}-gpud"