summaryrefslogtreecommitdiff
path: root/community/sysstat
diff options
context:
space:
mode:
Diffstat (limited to 'community/sysstat')
-rw-r--r--community/sysstat/PKGBUILD49
-rw-r--r--community/sysstat/lib64-fix.patch17
-rw-r--r--community/sysstat/sysstat.service11
3 files changed, 77 insertions, 0 deletions
diff --git a/community/sysstat/PKGBUILD b/community/sysstat/PKGBUILD
new file mode 100644
index 000000000..4e2d23b81
--- /dev/null
+++ b/community/sysstat/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 92869 2013-06-17 10:57:15Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Martin Devera <devik@cdi.cz>
+
+pkgname=sysstat
+pkgver=10.1.6
+pkgrel=2
+pkgdesc="a collection of performance monitoring tools (iostat,isag,mpstat,pidstat,sadf,sar)"
+arch=('i686' 'x86_64')
+url="http://pagesperso-orange.fr/sebastien.godard/"
+license=('GPL')
+depends=('lm_sensors')
+optdepends=('tk: to use isag'
+ 'gnuplot: to use isag')
+options=(zipman)
+backup=('etc/conf.d/sysstat'
+ 'etc/conf.d/sysstat.ioconf')
+source=(http://pagesperso-orange.fr/sebastien.godard/$pkgname-$pkgver.tar.gz
+ sysstat.service
+ lib64-fix.patch)
+md5sums=('909135c84e36d780d501274e7450f924'
+ '12ba479c606620193e8b7c6e982d5088'
+ '7ffa6bf990609d85367070f71b40a34b')
+
+prepare() {
+ cd $srcdir/$pkgname-$pkgver
+ patch -p1 <$srcdir/lib64-fix.patch
+ autoreconf
+}
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ conf_dir=/etc/conf.d ./configure --prefix=/usr \
+ --enable-yesterday \
+ --mandir=/usr/share/man \
+ --enable-install-isag \
+ --disable-man-group
+ make -j1
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+ install -D -m 744 cron/sysstat.cron.hourly $pkgdir/etc/cron.hourly/sysstat
+ install -D -m 744 cron/sysstat.cron.daily $pkgdir/etc/cron.daily/sysstat
+ chown -R root:root $pkgdir
+ install -Dm0644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service
+ mv $pkgdir/usr/bin/nfsiostat $pkgdir/usr/bin/$pkgname-nfsiostat
+}
diff --git a/community/sysstat/lib64-fix.patch b/community/sysstat/lib64-fix.patch
new file mode 100644
index 000000000..6e4ca7c12
--- /dev/null
+++ b/community/sysstat/lib64-fix.patch
@@ -0,0 +1,17 @@
+diff -wbBur sysstat-10.1.6.q/configure.in sysstat-10.1.6/configure.in
+--- sysstat-10.1.6.q/configure.in 2013-04-21 18:20:32.000000000 +0400
++++ sysstat-10.1.6/configure.in 2013-06-17 14:45:41.733915298 +0400
+@@ -207,13 +207,6 @@
+ fi
+
+ SADC_DIR=$AuxPrefix/lib
+-if test -d $AuxPrefix/lib64; then
+- # Look for lm (long mode) flag to know if CPU is 64 bit
+- grep " lm " /proc/cpuinfo >/dev/null 2>&1
+- if test $? = 0; then
+- SADC_DIR=$AuxPrefix/lib64
+- fi
+-fi
+
+ AC_MSG_CHECKING(sadc directory)
+ AC_ARG_VAR([sa_lib_dir],[sadc directory])
diff --git a/community/sysstat/sysstat.service b/community/sysstat/sysstat.service
new file mode 100644
index 000000000..2ff2365b3
--- /dev/null
+++ b/community/sysstat/sysstat.service
@@ -0,0 +1,11 @@
+[Unit]
+Description= Resets System Activity Logs
+After=syslog.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/lib/sa/sa1 --boot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target