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