1 # Maintainer: Florian Pritz <bluewind@xinu.at>
2 # Contributor: lp76 <l.peduto@gmail.com>
6 pkgdesc="A very simple mail statistics RRDtool frontend for Postfix and Sendmail"
7 url="https://mailgraph.schweikert.ch/"
11 depends=('rrdtool' 'perl-file-tail')
12 source=("https://mailgraph.schweikert.ch/pub/$pkgname-$pkgver.tar.gz"
14 md5sums=('0f0ae91968ea7ae0c1d14985c560530b'
15 '92d411ab7f14083a77faa07b2ade653f')
18 cd "$srcdir/$pkgname-$pkgver"
19 sed -i "s:mailgraph.rrd:/var/lib/mailgraph/mailgraph.rrd:" mailgraph.cgi
20 sed -i "s:mailgraph_virus.rrd:/var/lib/mailgraph/mailgraph_virus.rrd:" mailgraph.cgi
24 cd "$srcdir/$pkgname-$pkgver"
26 #CGI_DIR=`grep 'ScriptAlias /cgi-bin/' /etc/httpd/conf/httpd.conf | awk '{print $3}' | sed 's|"||g'`
27 CGI_DIR="/usr/share/webapps/mailgraph"
29 install -D -m755 mailgraph.pl "$pkgdir/usr/bin/mailgraph.pl"
30 install -D -m755 mailgraph.cgi "$pkgdir/$CGI_DIR/mailgraph.cgi"
31 install -D -m755 mailgraph.css "$pkgdir/$CGI_DIR/mailgraph.css"
32 install -D -m644 "$srcdir/mailgraph.service" "$pkgdir/usr/lib/systemd/system/mailgraph.service"
33 install -d -m755 "$pkgdir/var/lib/mailgraph"