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