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