summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sysstat/sysstat_12.7.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/sysstat/sysstat_12.7.5.bb')
-rw-r--r--meta/recipes-extended/sysstat/sysstat_12.7.5.bb80
1 files changed, 80 insertions, 0 deletions
diff --git a/meta/recipes-extended/sysstat/sysstat_12.7.5.bb b/meta/recipes-extended/sysstat/sysstat_12.7.5.bb
new file mode 100644
index 0000000000..d598d5366f
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat_12.7.5.bb
@@ -0,0 +1,80 @@
1SUMMARY = "System performance tools"
2DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux."
3HOMEPAGE = "https://sysstat.github.io/"
4LICENSE = "GPL-2.0-or-later"
5SECTION = "console/utils"
6
7SRC_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
13LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
14
15SRCREV = "2d7682f26f42cef9127b123e319349b330c4ab8f"
16S = "${WORKDIR}/git"
17
18DEPENDS += "base-passwd"
19
20# autotools-brokensep as this package doesn't use automake
21inherit autotools-brokensep gettext systemd
22
23PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
24PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
25PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only"
26PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}"
27
28EXTRA_OECONF += "--disable-stripping"
29
30SYSTEMD_PACKAGES = "${PN}"
31SYSTEMD_SERVICE:${PN} = "sysstat.service"
32SYSTEMD_AUTO_ENABLE = "enable"
33
34do_configure:prepend() {
35 export sa_lib_dir=${libexecdir}/sa
36}
37
38do_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
65pkg_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
73FILES:${PN} += " \
74 ${systemd_system_unitdir} \
75 ${nonarch_base_libdir}/systemd \
76 ${nonarch_libdir}/tmpfiles.d \
77"
78
79TARGET_CC_ARCH += "${LDFLAGS}"
80