diff options
Diffstat (limited to 'meta/recipes-extended/sysstat/sysstat_12.6.2.bb')
-rw-r--r-- | meta/recipes-extended/sysstat/sysstat_12.6.2.bb | 78 |
1 files changed, 73 insertions, 5 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat_12.6.2.bb b/meta/recipes-extended/sysstat/sysstat_12.6.2.bb index b5014eaefb..335ddd5746 100644 --- a/meta/recipes-extended/sysstat/sysstat_12.6.2.bb +++ b/meta/recipes-extended/sysstat/sysstat_12.6.2.bb | |||
@@ -1,9 +1,77 @@ | |||
1 | require sysstat.inc | 1 | SUMMARY = "System performance tools" |
2 | DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux." | ||
3 | HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/" | ||
4 | LICENSE = "GPL-2.0-or-later" | ||
5 | SECTION = "console/utils" | ||
2 | 6 | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" | 7 | SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/${BP}.tar.xz \ |
8 | file://99_sysstat \ | ||
9 | file://sysstat.service \ | ||
10 | file://0001-configure.in-remove-check-for-chkconfig.patch \ | ||
11 | file://CVE-2023-33204.patch \ | ||
12 | " | ||
4 | 13 | ||
5 | SRC_URI += "file://0001-configure.in-remove-check-for-chkconfig.patch \ | 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb" |
6 | file://CVE-2023-33204.patch \ | ||
7 | " | ||
8 | 15 | ||
9 | SRC_URI[sha256sum] = "3e77134aedaa6fc57d9745da67edfd8990e19adee71ac47196229261c563fb48" | 16 | SRC_URI[sha256sum] = "3e77134aedaa6fc57d9745da67edfd8990e19adee71ac47196229261c563fb48" |
17 | UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html" | ||
18 | |||
19 | DEPENDS += "base-passwd" | ||
20 | |||
21 | # autotools-brokensep as this package doesn't use automake | ||
22 | inherit autotools-brokensep gettext systemd upstream-version-is-even | ||
23 | |||
24 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
25 | PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors" | ||
26 | PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only" | ||
27 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}" | ||
28 | |||
29 | EXTRA_OECONF += "--disable-stripping" | ||
30 | |||
31 | SYSTEMD_PACKAGES = "${PN}" | ||
32 | SYSTEMD_SERVICE:${PN} = "sysstat.service" | ||
33 | SYSTEMD_AUTO_ENABLE = "enable" | ||
34 | |||
35 | do_configure:prepend() { | ||
36 | export sa_lib_dir=${libexecdir}/sa | ||
37 | } | ||
38 | |||
39 | do_install() { | ||
40 | autotools_do_install | ||
41 | |||
42 | # Don't version the documentation | ||
43 | mv ${D}${docdir}/${BP} ${D}${docdir}/${BPN} | ||
44 | |||
45 | # don't install /var/log/sa when populating rootfs. Do it through volatile | ||
46 | rm -rf ${D}/var | ||
47 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
48 | install -d ${D}/etc/default/volatiles | ||
49 | install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles | ||
50 | fi | ||
51 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
52 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
53 | echo "d ${localstatedir}/log/sa - - - -" \ | ||
54 | > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf | ||
55 | |||
56 | # Unless both cron and systemd are enabled, install our own | ||
57 | # systemd unit file. Otherwise the package will install one. | ||
58 | if ${@bb.utils.contains('PACKAGECONFIG', 'cron systemd', 'false', 'true', d)}; then | ||
59 | install -d ${D}${systemd_system_unitdir} | ||
60 | install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_system_unitdir} | ||
61 | sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_system_unitdir}/sysstat.service | ||
62 | fi | ||
63 | fi | ||
64 | } | ||
65 | |||
66 | pkg_postinst:${PN} () { | ||
67 | if [ ! -n "$D" ]; then | ||
68 | if [ -e /etc/init.d/populate-volatile.sh ]; then | ||
69 | /etc/init.d/populate-volatile.sh update | ||
70 | fi | ||
71 | fi | ||
72 | } | ||
73 | |||
74 | FILES:${PN} += "${systemd_system_unitdir} ${nonarch_base_libdir}/systemd" | ||
75 | |||
76 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
77 | |||