summaryrefslogtreecommitdiff
path: root/packages/sys-apps/sysstat/sysstat.exlib
blob: 01a13b068473b67397d8e98613d7a6a049fd7d5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Copyright 2010-2017 Wulf C. Krueger <philantrop@exherbo.org>
# Distributed under the terms of the GNU General Public License v2

require systemd-service autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 ] ]

export_exlib_phases src_prepare src_configure src_install

SUMMARY="Performance/system monitoring tools for Linux"
DESCRIPTION="
iostat(1) reports CPU statistics and input/output statistics for devices, partitions
and network filesystems.
mpstat(1) reports individual or combined processor related statistics.
pidstat(1) reports statistics for Linux tasks (processes) : I/O, CPU, memory, etc.
sar(1) collects, reports and saves system activity information (CPU, memory, disks,
interrupts, network interfaces, TTY, kernel tables,etc.)
sadc(8) is the system activity data collector, used as a backend for sar.
sa1(8) collects and stores binary data in the system activity daily data file. It
is a front end to sadc designed to be run from cron.
sa2(8) writes a summarized daily activity report. It is a front end to sar designed
to be run from cron.
sadf(1) displays data collected by sar in multiple formats (CSV, XML, etc.) This
is useful to load performance data into a database, or import them in a spreadsheet
to make graphs.
tapestat(1) reports statistics for tapes connected to the system.
"
HOMEPAGE="http://pagesperso-orange.fr/sebastien.godard"
DOWNLOADS="${HOMEPAGE}/${PNV}.tar.xz"

UPSTREAM_CHANGELOG="${HOMEPAGE}/changelog.html [[ lang = en ]]"
UPSTREAM_DOCUMENTATION="${HOMEPAGE}/documentation.html [[ lang = en ]]"

LICENCES="GPL-2"
SLOT="0"
MYOPTIONS="
    sensors [[ description = [ Enable sensors support. ] ]]
"

DEPENDENCIES="
    build:
        sys-devel/gettext
    build+run:
        sensors? ( sys-apps/lm_sensors )
    suggestion:
        virtual/cron
"

DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/${PN}-11.1.4-multiarch.patch )

DEFAULT_SRC_CONFIGURE_PARAMS=(
    --enable-collect-all
    --enable-copy-only
    --enable-install-cron
    --enable-nls
    --disable-stripping
    --with-systemdsystemunitdir="${SYSTEMDSYSTEMUNITDIR}"
)

DEFAULT_SRC_CONFIGURE_OPTION_ENABLES=( sensors )

sysstat_src_prepare() {
    # TODO: report upstream, respect datarootdir
    edo sed \
        -e 's:$(PREFIX)/share/locale:$(datarootdir)/locale:' \
        -i Makefile.in

    autotools_src_prepare
}

sysstat_src_configure() {
    # Stupid build system is stupid.
    export conf_dir=/etc/sysstat

    default
}

sysstat_src_install() {
    default

    # No need to install the licence.
    edo rm "${IMAGE}"/usr/share/doc/${PNVR}/COPYING
    dodoc -r contrib xml
    dodoc cron/{crontab,sysstat.crond,sysstat.cron.daily,sysstat.cron.hourly,sysstat.crond.sample,sysstat.crond.sample,crontab.sample}

    keepdir /var/log/sa
}