1 # Contributor: graysky <graysky AT archlinux dot us>
2 # Contributor: Jordi Sanfeliu <jordi AT fibranet dot cat>
7 pkgdesc='A lightweight system monitoring tool that uses rrd databases.'
10 url="http://www.$pkgname.org"
11 depends=('perl-cgi' 'perl-mailtools' 'perl-mime-lite' 'perl-libwww' 'rrdtool' 'perl-http-message')
12 optdepends=('monitorix-sync-daemon: offload your databases to tmpfs to save i/o to your disk'
13 'lm_sensors: enable support for system temp monitoring'
14 'smartmontools: enable support for hdd bad sector monitoring.'
15 'nvidia: enable support for nVidia card temp and usage monitoring.'
16 'hddtemp: enable support for hdd temp monitoring'
17 'terminus-font: if your graphs do not contain letters and numbers you may need this font package')
18 backup=etc/$pkgname.conf
19 source=("http://www.$pkgname.org/$pkgname-$pkgver.tar.gz"
21 sha256sums=('a0f32f4b16beb4a3ade1763cdef642753f4b8480dae0fd577fa50247a2620f5f'
22 'b9471a8fbe808a5fac091f257585d82cd67b701a3c4ee55b7a4f9e9c8579854f')
23 install=readme.install
24 _basedir="srv/http/monitorix"
25 _libdir="var/lib/$pkgname"
28 cd "$srcdir"/$pkgname-$pkgver
29 install -D $pkgname "$pkgdir"/usr/bin/$pkgname
30 mkdir -p "$pkgdir"/$_basedir/cgi-bin
31 install -D "$pkgname".cgi "$pkgdir"/$_basedir/cgi-bin/$pkgname.cgi
35 sed -e '/^our $BASE_DIR/ s,\/usr\/share,\/srv\/http,' -e '/^our $BASE_CGI/ s,-cgi,\/cgi-bin,' < $pkgname.conf > "$pkgdir"/etc/$pkgname.conf
37 install -dm777 "$pkgdir"/$_basedir/imgs
38 mkdir -p "$pkgdir"/usr/share/doc
39 install -D $pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
40 cp Changes COPYING $pkgname-{alert.sh,apache.conf} README README.{FreeBSD,nginx} "$pkgdir"/usr/share/doc
41 cp {logo_bot,logo_top,${pkgname}ico}.png "$pkgdir"/$_basedir
42 gzip -9 man/man8/$pkgname.8
43 install -Dm644 man/man8/$pkgname.8.gz "$pkgdir"/usr/share/man/man8/$pkgname.8.gz
44 gzip -9 man/man5/$pkgname.conf.5
45 install -Dm644 man/man5/$pkgname.conf.5.gz "$pkgdir"/usr/share/man/man5/$pkgname.conf.5.gz
46 mkdir -p "$pkgdir"/$_libdir
47 cp -r reports "$pkgdir"/$_libdir
48 install -D "$srcdir"/rc.$pkgname "$pkgdir"/etc/rc.d/$pkgname