blob: c353291935269b99887c3c925f9516875d18ba5d [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
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050012UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html"
13UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
14
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015DEPENDS += "base-passwd"
16
17inherit autotools-brokensep gettext systemd
18
19EXTRA_OECONF += "--disable-sensors"
20EXTRA_OEMAKE += 'LFLAGS=""'
21
22SYSTEMD_PACKAGES = "${PN}"
23SYSTEMD_SERVICE_${PN} = "sysstat.service"
24SYSTEMD_AUTO_ENABLE = "enable"
25
26do_configure_prepend() {
27 export sa_lib_dir=${libdir}/sa
28}
29
30do_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
44pkg_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
54FILES_${PN} += "${libdir}/sa"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050055
56TARGET_CC_ARCH += "${LDFLAGS}"
57LDFLAGS_append_libc-uclibc = " -lintl"