blob: 5c761fa69324fafb5edd092dd29d6c244b2ee47c [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "System performance tools"
2DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux."
3HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/"
4LICENSE = "GPLv2+"
5SECTION = "console/utils"
6
7SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \
8 file://99_sysstat \
9 file://sysstat.service \
10 "
11
12DEPENDS += "base-passwd"
13
14inherit autotools-brokensep gettext systemd
15
16EXTRA_OECONF += "--disable-sensors"
17EXTRA_OEMAKE += 'LFLAGS=""'
18
19SYSTEMD_PACKAGES = "${PN}"
20SYSTEMD_SERVICE_${PN} = "sysstat.service"
21SYSTEMD_AUTO_ENABLE = "enable"
22
23do_configure_prepend() {
24 export sa_lib_dir=${libdir}/sa
25}
26
27do_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
41pkg_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
51FILES_${PN} += "${libdir}/sa"
52FILES_${PN}-dbg += "${libdir}/sa/.debug/"
53
54TARGET_CC_ARCH += "${LDFLAGS}"
55LDFLAGS_append_libc-uclibc = " -lintl"