2011-05-05 11:38:06 +08:00
|
|
|
pkgname=awstats
|
2016-05-09 04:32:49 +08:00
|
|
|
pkgver=7.5
|
2011-05-05 11:38:06 +08:00
|
|
|
pkgrel=1
|
2012-03-16 22:51:37 +08:00
|
|
|
pkgdesc="Tool that generates web, streaming, ftp and mail server statistics, graphically"
|
2011-05-05 11:38:06 +08:00
|
|
|
arch=('any')
|
|
|
|
license=('GPL')
|
|
|
|
url="http://awstats.sourceforge.net/"
|
|
|
|
depends=('perl')
|
|
|
|
optdepends=('mod_perl: if you are using Apache as your HTTP server' 'mod_cgi: if you are using lighttpd as your HTTP server')
|
2012-03-16 22:51:37 +08:00
|
|
|
categories=('network')
|
2011-05-05 11:38:06 +08:00
|
|
|
install="awstats.install"
|
|
|
|
backup=('etc/awstats/awstats.model.conf' 'etc/httpd/conf/extra/httpd-awstats.conf')
|
|
|
|
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz" "cron.awstats")
|
2016-05-09 04:32:49 +08:00
|
|
|
sha512sums=('d69a66b5ef94d8a7378ece0453a3617f71ad030d81c45cff926fae1319eacdcdcbe2e68513153cd7444d77cbb950827964b0157ce74c04be76781c071f016a35'
|
|
|
|
'6fba798a4e6afe5a4dd2def9bf87999df511781851b1d7d630c3d55f8b4e8e5f7e1b99fa976442545daa99740ac64e20e76990898204463f6d56fbfb911c056e')
|
2011-05-05 11:38:06 +08:00
|
|
|
|
|
|
|
package() {
|
|
|
|
_SYSCONFDIR='etc'
|
|
|
|
_WWWROOT='srv/http/awstats'
|
|
|
|
_INSTDIR="usr/share/${pkgname}"
|
|
|
|
_DOCDIR="usr/share/doc/${pkgname}-${pkgver}"
|
|
|
|
|
|
|
|
cd $srcdir/${pkgname}-${pkgver}
|
|
|
|
|
2013-02-14 06:07:30 +08:00
|
|
|
mkdir -p $pkgdir/${_INSTDIR}/tools/webmin/ || return 1
|
|
|
|
mkdir -p $pkgdir/${_INSTDIR}/tools/xslt/ || return 1
|
|
|
|
mkdir -p $pkgdir/${_WWWROOT}/ || return 1
|
|
|
|
mkdir -p $pkgdir/${_DOCDIR}/ || return 1
|
2011-05-05 11:38:06 +08:00
|
|
|
mkdir -p $pkgdir/var/lib/$pkgname || return 1
|
|
|
|
|
2014-04-01 03:53:59 +08:00
|
|
|
# Chakra specific path:
|
2011-05-05 11:38:06 +08:00
|
|
|
install -Dm644 tools/httpd_conf $pkgdir/${_SYSCONFDIR}/httpd/conf/extra/httpd-awstats.conf || return 1
|
|
|
|
install -Dm644 wwwroot/cgi-bin/awstats.model.conf $pkgdir/${_SYSCONFDIR}/awstats/awstats.model.conf || return 1
|
|
|
|
install -Dm744 $srcdir/cron.awstats $pkgdir/${_SYSCONFDIR}/cron.hourly/awstats || return 1
|
|
|
|
|
2013-02-14 06:07:30 +08:00
|
|
|
install -m 755 tools/logresolvemerge.pl $pkgdir/${_INSTDIR}/tools/logresolvemerge.pl || return 1
|
|
|
|
install -m 755 tools/maillogconvert.pl $pkgdir/${_INSTDIR}/tools/maillogconvert.pl || return 1
|
|
|
|
install -m 755 tools/urlaliasbuilder.pl $pkgdir/${_INSTDIR}/tools/urlaliasbuilder.pl || return 1
|
|
|
|
install -m 755 tools/awstats_buildstaticpages.pl $pkgdir/${_INSTDIR}/tools/awstats_buildstaticpages.pl || return 1
|
|
|
|
install -m 755 tools/awstats_configure.pl $pkgdir/${_INSTDIR}/tools/awstats_configure.pl || return 1
|
|
|
|
install -m 755 tools/awstats_exportlib.pl $pkgdir/${_INSTDIR}/tools/awstats_exportlib.pl || return 1
|
|
|
|
install -m 755 tools/awstats_updateall.pl $pkgdir/${_INSTDIR}/tools/awstats_updateall.pl || return 1
|
|
|
|
install -m 755 tools/webmin/* $pkgdir/${_INSTDIR}/tools/webmin || return 1
|
|
|
|
install -m 755 tools/xslt/* $pkgdir/${_INSTDIR}/tools/xslt || return 1
|
2011-05-05 11:38:06 +08:00
|
|
|
|
|
|
|
# install the documentation
|
2013-02-14 06:07:30 +08:00
|
|
|
cp -ra docs/* $pkgdir/${_DOCDIR}/ || return 1
|
2011-05-05 11:38:06 +08:00
|
|
|
|
|
|
|
# www files
|
2013-02-14 06:07:30 +08:00
|
|
|
cp -ra wwwroot/* $pkgdir/${_WWWROOT}/ || return 1
|
|
|
|
rm -f $pkgdir/${_WWWROOT}/cgi-bin/awstats.model.conf || return 1
|
2015-09-22 05:02:36 +08:00
|
|
|
install -Dm444 README.md $pkgdir/${_INSTDIR}/README.md || return 1
|
2011-05-05 11:38:06 +08:00
|
|
|
|
|
|
|
# fix the default http config
|
|
|
|
sed \
|
2013-02-14 06:07:30 +08:00
|
|
|
-e "s|/usr/local/awstats/wwwroot|/${_WWWROOT}|g" \
|
2011-05-05 11:38:06 +08:00
|
|
|
-i $pkgdir/${_SYSCONFDIR}/httpd/conf/extra/httpd-awstats.conf || return 1
|
|
|
|
|
2013-02-14 06:07:30 +08:00
|
|
|
echo "deny from all" > $pkgdir/${_WWWROOT}.htaccess
|
2011-05-05 11:38:06 +08:00
|
|
|
}
|