Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 = "GPLv2+" |
| 5 | SECTION = "console/utils" |
| 6 | |
| 7 | SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \ |
| 8 | file://99_sysstat \ |
| 9 | file://sysstat.service \ |
| 10 | " |
| 11 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 12 | UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 13 | UPSTREAM_VERSION_UNKNOWN = "1" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 14 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | DEPENDS += "base-passwd" |
| 16 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 17 | # autotools-brokensep as this package doesn't use automake |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 18 | inherit autotools-brokensep gettext systemd upstream-version-is-even |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 20 | PACKAGECONFIG ??= "" |
| 21 | PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors" |
Brad Bishop | 393846f | 2019-05-20 12:24:11 -0400 | [diff] [blame] | 22 | PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 23 | |
| 24 | EXTRA_OECONF += "--disable-stripping" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | |
| 26 | SYSTEMD_PACKAGES = "${PN}" |
| 27 | SYSTEMD_SERVICE_${PN} = "sysstat.service" |
| 28 | SYSTEMD_AUTO_ENABLE = "enable" |
| 29 | |
| 30 | do_configure_prepend() { |
| 31 | export sa_lib_dir=${libdir}/sa |
| 32 | } |
| 33 | |
| 34 | do_install() { |
| 35 | autotools_do_install |
| 36 | |
| 37 | # don't install /var/log/sa when populating rootfs. Do it through volatile |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 38 | rm -rf ${D}/var |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 39 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 40 | install -d ${D}/etc/default/volatiles |
| 41 | install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles |
| 42 | fi |
| 43 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 44 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 45 | echo "d ${localstatedir}/log/sa - - - -" \ |
| 46 | > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf |
| 47 | fi |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 48 | |
| 49 | install -d ${D}${systemd_unitdir}/system |
| 50 | install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system |
| 51 | sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service |
| 52 | } |
| 53 | |
| 54 | pkg_postinst_${PN} () { |
| 55 | if [ -n "$D" ]; then |
| 56 | exit 0 |
| 57 | fi |
| 58 | if [ -e /etc/init.d/populate-volatile.sh ]; then |
| 59 | /etc/init.d/populate-volatile.sh update |
| 60 | fi |
| 61 | } |
| 62 | |
Brad Bishop | 393846f | 2019-05-20 12:24:11 -0400 | [diff] [blame] | 63 | FILES_${PN} += "${libdir}/sa ${systemd_system_unitdir}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 64 | |
| 65 | TARGET_CC_ARCH += "${LDFLAGS}" |