1 # Maintainer: Phillip Smith <fukawi2@NO-SPAM.gmail.com>
2 # http://github.com/fukawi2/aur-packages
3 # Contributor: Piotr Beling <qwak@w8.pl>
8 pkgdesc="tool that generates web, streaming, ftp and mail server statistics, graphically"
11 url="http://awstats.sourceforge.net/"
13 optdepends=('mod_perl: if you are using Apache as your HTTP server' 'mod_cgi: if you are using lighttpd as your HTTP server')
14 install="awstats.install"
15 backup=('etc/awstats/awstats.model.conf' 'etc/httpd/conf/extra/httpd-awstats.conf')
16 source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz" "cron.awstats")
17 md5sums=('3e8e09b9ebe74513bb34290dbcd37b45'
18 '2103e3d97f8b4ff31cd4022c4ee839f7')
21 msg "Nothing to compile for $pkgname"
26 _WWWROOT='srv/http/awstats'
27 _INSTDIR="usr/share/${pkgname}"
28 _DOCDIR="usr/share/doc/${pkgname}-${pkgver}"
30 cd $srcdir/${pkgname}-${pkgver}
32 mkdir -p $pkgdir/$_INSTDIR/tools/webmin/ || return 1
33 mkdir -p $pkgdir/$_INSTDIR/tools/xslt/ || return 1
34 mkdir -p $pkgdir/$_WWWROOT/ || return 1
35 mkdir -p $pkgdir/$_DOCDIR/ || return 1
36 mkdir -p $pkgdir/var/lib/$pkgname || return 1
38 # Arch Linux specific path:
39 install -Dm644 tools/httpd_conf $pkgdir/${_SYSCONFDIR}/httpd/conf/extra/httpd-awstats.conf || return 1
40 install -Dm644 wwwroot/cgi-bin/awstats.model.conf $pkgdir/${_SYSCONFDIR}/awstats/awstats.model.conf || return 1
41 install -Dm744 $srcdir/cron.awstats $pkgdir/${_SYSCONFDIR}/cron.hourly/awstats || return 1
43 install -m 755 tools/logresolvemerge.pl $pkgdir/$_INSTDIR/tools/logresolvemerge.pl || return 1
44 install -m 755 tools/maillogconvert.pl $pkgdir/$_INSTDIR/tools/maillogconvert.pl || return 1
45 install -m 755 tools/urlaliasbuilder.pl $pkgdir/$_INSTDIR/tools/urlaliasbuilder.pl || return 1
46 install -m 755 tools/awstats_buildstaticpages.pl $pkgdir/$_INSTDIR/tools/awstats_buildstaticpages.pl || return 1
47 install -m 755 tools/awstats_configure.pl $pkgdir/$_INSTDIR/tools/awstats_configure.pl || return 1
48 install -m 755 tools/awstats_exportlib.pl $pkgdir/$_INSTDIR/tools/awstats_exportlib.pl || return 1
49 install -m 755 tools/awstats_updateall.pl $pkgdir/$_INSTDIR/tools/awstats_updateall.pl || return 1
50 install -m 755 tools/webmin/* $pkgdir/$_INSTDIR/tools/webmin || return 1
51 install -m 755 tools/xslt/* $pkgdir/$_INSTDIR/tools/xslt || return 1
53 # install the documentation
54 cp -ra docs/* $pkgdir/$_DOCDIR/ || return 1
57 cp -ra wwwroot/* $pkgdir/$_WWWROOT/ || return 1
58 rm -f $pkgdir/$_WWWROOT/cgi-bin/awstats.model.conf || return 1
59 install -Dm444 README.TXT $pkgdir/$_INSTDIR/README.TXT || return 1
61 # fix the default http config
63 -e "s|/usr/local/awstats/wwwroot|/$_WWWROOT|g" \
64 -i $pkgdir/${_SYSCONFDIR}/httpd/conf/extra/httpd-awstats.conf || return 1
66 echo "deny from all" > $pkgdir/.htaccess
69 # vim:set ts=2 sw=2 et: