summaryrefslogtreecommitdiffstats
path: root/abs/not_built/extra/monitorix/PKGBUILD
blob: d2dceec44ea7d61efb44f7aa31cd966da972b342 (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
# Contributor: graysky <graysky AT archlinux dot us>
# Contributor: res <andres87p gmail>

pkgname=monitorix
pkgver=1.5.2
pkgrel=1
pkgdesc='A lightweight system monitoring tool that uses rrd databases.'
arch=(any)
url=http://www.$pkgname.org/
license=(GPL)
depends=('rrdtool' 'perl-libwww')
optdepends=('lm_sensors: enable support for system temp monitoring'
'hddtemp: enable support for hdd temp monitoring'
'metamail: enable support for reports via system mail')

backup=(etc/$pkgname.conf)
source=($url$pkgname-$pkgver.tar.gz
        monitorix.rc.d)
install=('readme.install')

build() {
  cd $pkgname-$pkgver

  install -D $pkgname.pl $pkgdir/usr/sbin/$pkgname.pl
  install -D ../$pkgname.rc.d $pkgdir/etc/rc.d/$pkgname

# use Arch defaults
  sed -e '/^our $OSTYPE/ s,RHFC,Arch,' \
      -e '/^our @HDDTEMP_LIST/ s,hda,sda,' < $pkgname.conf \
                                           > $pkgdir/etc/$pkgname.conf
  mkdir -p $pkgdir/var/lib/$pkgname/usage
  cp -r reports $pkgdir/var/lib/$pkgname

  mkdir -p $pkgdir/usr/share/doc/$pkgname
  cp Changes $pkgname-apache.conf $pkgname-alert.sh README README.nginx TODO \
     $pkgdir/usr/share/doc/$pkgname

  install -dm777 $pkgdir/srv/http/$pkgname/imgs
  cp {logo_bot,logo_top,${pkgname}ico}.png $pkgdir/srv/http/$pkgname

  install -D $pkgname.cgi $pkgdir/srv/http/cgi-bin/$pkgname.cgi

  gzip -9 man/man5/$pkgname.conf.5
  install -Dm644 man/man5/$pkgname.conf.5.gz $pkgdir/usr/share/man/man5/$pkgname.conf.5.gz
}
sha256sums=('3d025d097fe8dd458501b8cf3345b80b1b66625ae257e21452b95d1596ec5b6d'
            'f9ba4e09f8e583808bc9fa5476ddac067182799512e103ea40565b7da47dbab6')