updated on Mon Jan 23 00:00:36 UTC 2012
[aur-mirror.git] / mailgraph / PKGBUILD
blob6694c1ed18ff9a6008958e83d3de7e6f5c6009e2
1 # Contributor: lp76 <l.peduto@gmail.com>
2 pkgname=mailgraph
3 pkgver=1.14
4 pkgrel=2
5 pkgdesc="A very simple mail statistics RRDtool frontend for Postfix and Sendmail"
6 url="http://mailgraph.schweikert.ch/"
7 arch=(i686)
8 license=('GPL')
9 install=$pkgname.install
10 options=(emptydirs)
11 depends=('apache' 'rrdtool' 'perl' 'perl-file-tail' 'ttf-dejavu')
12 source=(http://mailgraph.schweikert.ch/pub/$pkgname-$pkgver.tar.gz mailgraph mailgraph.conf.d)
13 md5sums=('0f0ae91968ea7ae0c1d14985c560530b' 'a9e4330fb771561990d76fbbe97acfa8' 'f7829513ba7b6016de4a7ba55615fb3e')
15 build() {
16   export CGI_DIR=`grep 'ScriptAlias /cgi-bin/' /etc/httpd/conf/httpd.conf | awk '{print $3}' | sed 's|"||g'`
17   cd $srcdir/$pkgname-$pkgver
18   sed -i "s:mailgraph.rrd:/var/lib/mailgraph/mailgraph.rrd:" mailgraph.cgi
19   sed -i "s:mailgraph_virus.rrd:/var/lib/mailgraph/mailgraph_virus.rrd:" mailgraph.cgi
20   install -D -m755 mailgraph.pl $pkgdir/usr/bin/mailgraph.pl
21   install -D -m755 mailgraph.cgi $pkgdir/$CGI_DIR/mailgraph.cgi
22   install -D -m755 $srcdir/mailgraph $pkgdir/etc/rc.d/mailgraph
23   install -D -m644 $srcdir/mailgraph.conf.d $pkgdir/etc/conf.d/mailgraph
24   install -d -m755 $pkgdir/var/lib/mailgraph