xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-support/atop/atop_2.4.0.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Monitor for system resources and process activity"
2*4882a593SmuzhiyunDESCRIPTION = "Atop is an ASCII full-screen performance monitor for Linux that \
3*4882a593Smuzhiyunis capable of reporting the activity of all processes (even if processes have \
4*4882a593Smuzhiyunfinished during the interval), daily logging of system and process activity for \
5*4882a593Smuzhiyunlong-term analysis, highlighting overloaded system resources by using colors, \
6*4882a593Smuzhiyunetc. At regular intervals, it shows system-level activity related to the CPU, \
7*4882a593Smuzhiyunmemory, swap, disks (including LVM) and network layers, and for every process \
8*4882a593Smuzhiyun(and thread) it shows e.g. the CPU utilization, memory growth, disk \
9*4882a593Smuzhiyunutilization, priority, username, state, and exit code."
10*4882a593SmuzhiyunHOMEPAGE = "http://www.atoptool.nl"
11*4882a593SmuzhiyunSECTION = "console/utils"
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunLICENSE = "GPL-2.0-only"
14*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunDEPENDS = "ncurses zlib"
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunSRC_URI = "http://www.atoptool.nl/download/${BP}.tar.gz \
19*4882a593Smuzhiyun           ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://volatiles.atop.conf', 'file://volatiles.99_atop', d)} \
20*4882a593Smuzhiyun           file://fix-permissions.patch \
21*4882a593Smuzhiyun           file://sysvinit-implement-status.patch \
22*4882a593Smuzhiyun           file://0001-atop.daily-atop.init-atop-pm.sh-Avoid-using-bash.patch \
23*4882a593Smuzhiyun           "
24*4882a593SmuzhiyunSRC_URI[md5sum] = "1077da884ed94f2bc3c81ac3ab970436"
25*4882a593SmuzhiyunSRC_URI[sha256sum] = "be1c010a77086b7d98376fce96514afcd73c3f20a8d1fe01520899ff69a73d69"
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunCVE_CHECK_IGNORE += "\
28*4882a593Smuzhiyun    CVE-2011-3618 \
29*4882a593Smuzhiyun"
30*4882a593Smuzhiyun
31*4882a593Smuzhiyundo_compile() {
32*4882a593Smuzhiyun    oe_runmake all
33*4882a593Smuzhiyun}
34*4882a593Smuzhiyun
35*4882a593Smuzhiyundo_install() {
36*4882a593Smuzhiyun    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
37*4882a593Smuzhiyun        make DESTDIR=${D} VERS=${PV} SYSDPATH=${systemd_system_unitdir} \
38*4882a593Smuzhiyun            PMPATHD=${systemd_unitdir}/system-sleep systemdinstall
39*4882a593Smuzhiyun        install -d ${D}${sysconfdir}/tmpfiles.d
40*4882a593Smuzhiyun        install -m 644 ${WORKDIR}/volatiles.atop.conf ${D}${sysconfdir}/tmpfiles.d/atop.conf
41*4882a593Smuzhiyun        rm -f ${D}${systemd_system_unitdir}/atopacct.service
42*4882a593Smuzhiyun    else
43*4882a593Smuzhiyun        make DESTDIR=${D} VERS=${PV} sysvinstall
44*4882a593Smuzhiyun        install -d ${D}${sysconfdir}/default/volatiles
45*4882a593Smuzhiyun        install -m 644 ${WORKDIR}/volatiles.99_atop ${D}${sysconfdir}/default/volatiles/99_atop
46*4882a593Smuzhiyun        rm -f ${D}${sysconfdir}/init.d/atopacct
47*4882a593Smuzhiyun    fi
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun    # /var/log/atop will be created in runtime
50*4882a593Smuzhiyun    rm -rf ${D}${localstatedir}/log
51*4882a593Smuzhiyun    rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun    # remove atopacct related files
54*4882a593Smuzhiyun    rm -rf ${D}${sbindir} ${D}${mandir}/man8
55*4882a593Smuzhiyun}
56*4882a593Smuzhiyun
57*4882a593Smuzhiyuninherit systemd
58*4882a593Smuzhiyun
59*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "atop.service atopgpu.service"
60*4882a593SmuzhiyunSYSTEMD_AUTO_ENABLE = "disable"
61*4882a593Smuzhiyun
62*4882a593SmuzhiyunFILES:${PN} += "${systemd_unitdir}/system-sleep"
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunRDEPENDS:${PN} = "procps"
65