archlinux-pkgbuilds/PKGBUILD

50 lines
1.8 KiB
Text
Raw Normal View History

2015-06-09 00:01:20 +02:00
# Contributor: graysky <graysky AT archlinux dot us>
pkgname=monitorix
2015-09-16 23:15:11 +02:00
pkgver=3.8.0
pkgrel=1
2015-06-09 00:01:20 +02:00
pkgdesc='A lightweight system monitoring tool that uses rrd databases.'
arch=('any')
url='http://www.monitorix.org'
license=('GPLv2')
depends=('perl' 'perl-cgi' 'perl-mailtools' 'perl-mime-lite' 'perl-libwww'
'perl-dbi' 'perl-xml-simple' 'perl-config-simple' 'perl-config-general'
'rrdtool' 'perl-http-server-simple')
optdepends=(
'anything-sync-daemon: offload your databases to tmpfs to save i/o to your disk.'
'hddtemp: enable support for hdd temp monitoring.'
'lm_sensors: enable support for system temp monitoring.'
'nvidia: enable support for nVidia card temp and usage monitoring.'
'smartmontools: enable support for hdd bad sector monitoring.'
'terminus-font: if graphs do not contain characters, you may need this font package.')
conflicts=$pkgname-git
backup=(etc/$pkgname/$pkgname.conf etc/$pkgname.conf)
install=readme.install
source=("http://www.$pkgname.org/$pkgname-$pkgver.tar.gz")
2015-09-16 23:15:11 +02:00
sha256sums=('77f396333c9d22153b01b2ff5c4c52fd6bf2c8c2256322195593813402876d73')
2015-06-09 00:01:20 +02:00
prepare() {
cd "$pkgname-$pkgver"
# use Arch default location for http servers and enable built-in httpd
sed -i -e '/^base_dir/ s,var\/lib\/monitorix\/www,srv\/http\/monitorix,' \
-i -e '/^<httpd_builtin>/{$!N; s/y/n/}' $pkgname.conf
# apply fix for RRDtool 1.5 scheduled to be included in the next release
sed -i '/$macti = $minac/ s,"",0,' lib/system.pm
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" BASEDIR=/srv/http/monitorix \
WWWDIR=/srv/http/monitorix install-systemd-all
# Arch provides the license so do not duplicate it
rm -f "$pkgdir/usr/share/doc/$pkgname/COPYING"
# remove unneed files
rm -f "$pkgdir/usr/share/doc/$pkgname/README.OpenBSD"
rm -f "$pkgdir/usr/share/doc/$pkgname/README.NetBSD"
rm -f "$pkgdir/usr/share/doc/$pkgname/README.FreeBSD"
}