blob: bb5629db4c8287a8c6272c198208c61756e8d5be [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
Patrick Williamsc0f7c042017-02-23 20:41:17 -060017# autotools-brokensep as this package doesn't use automake
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018inherit autotools-brokensep gettext systemd
19
20EXTRA_OECONF += "--disable-sensors"
21EXTRA_OEMAKE += 'LFLAGS=""'
22
23SYSTEMD_PACKAGES = "${PN}"
24SYSTEMD_SERVICE_${PN} = "sysstat.service"
25SYSTEMD_AUTO_ENABLE = "enable"
26
27do_configure_prepend() {
28 export sa_lib_dir=${libdir}/sa
29}
30
31do_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
45pkg_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
55FILES_${PN} += "${libdir}/sa"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050056
57TARGET_CC_ARCH += "${LDFLAGS}"
58LDFLAGS_append_libc-uclibc = " -lintl"