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" |
| 13 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" |
| 14 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | DEPENDS += "base-passwd" |
| 16 | |
| 17 | inherit autotools-brokensep gettext systemd |
| 18 | |
| 19 | EXTRA_OECONF += "--disable-sensors" |
| 20 | EXTRA_OEMAKE += 'LFLAGS=""' |
| 21 | |
| 22 | SYSTEMD_PACKAGES = "${PN}" |
| 23 | SYSTEMD_SERVICE_${PN} = "sysstat.service" |
| 24 | SYSTEMD_AUTO_ENABLE = "enable" |
| 25 | |
| 26 | do_configure_prepend() { |
| 27 | export sa_lib_dir=${libdir}/sa |
| 28 | } |
| 29 | |
| 30 | do_install() { |
| 31 | autotools_do_install |
| 32 | |
| 33 | # don't install /var/log/sa when populating rootfs. Do it through volatile |
| 34 | |
| 35 | rm -rf ${D}/var |
| 36 | install -d ${D}/etc/default/volatiles |
| 37 | install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles |
| 38 | |
| 39 | install -d ${D}${systemd_unitdir}/system |
| 40 | install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system |
| 41 | sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service |
| 42 | } |
| 43 | |
| 44 | pkg_postinst_${PN} () { |
| 45 | if [ -n "$D" ]; then |
| 46 | exit 0 |
| 47 | fi |
| 48 | if [ -e /etc/init.d/populate-volatile.sh ]; then |
| 49 | /etc/init.d/populate-volatile.sh update |
| 50 | fi |
| 51 | } |
| 52 | |
| 53 | |
| 54 | FILES_${PN} += "${libdir}/sa" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 55 | |
| 56 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 57 | LDFLAGS_append_libc-uclibc = " -lintl" |