summaryrefslogtreecommitdiffstats
path: root/awstats/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'awstats/PKGBUILD')
-rw-r--r--awstats/PKGBUILD136
1 files changed, 53 insertions, 83 deletions
diff --git a/awstats/PKGBUILD b/awstats/PKGBUILD
index 39d587f..a98377a 100644
--- a/awstats/PKGBUILD
+++ b/awstats/PKGBUILD
@@ -1,95 +1,65 @@
-# Committer: Piotr Beling <qwak@w8.pl>
+# Maintainer: Phillip Smith <fukawi2@NOSPAM.gmail.com
+# Contributor: Piotr Beling <qwak@w8.pl>
pkgname=awstats
-pkgver=6.9
+pkgver=6.95
pkgrel=1
pkgdesc="tool that generates web, streaming, ftp and mail server statistics, graphically"
-arch=(any)
-license=(GPL)
+arch=('any')
+license='GPL'
url="http://awstats.sourceforge.net/"
depends=('perl')
-source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz awstats)
-install=awstats.install
+install="awstats.install"
backup=('etc/awstats/awstats.model.conf' 'etc/httpd/conf/extra/httpd-awstats.conf')
+source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz" "cron.awstats")
+md5sums=('26a5b19fa9f395e9e7dafed37b795d7f'
+ '2103e3d97f8b4ff31cd4022c4ee839f7')
build() {
- local RPM_BUILD_ROOT=${startdir}/pkg
- local _sysconfdir=etc
- cd ${startdir}/src/awstats-${pkgver}
-
- #next lines comes from http://awstats.sourceforge.net/files/awstats.spec, with % -> $ and some other archlinux specyfic modyfications
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/tools
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/tools/webmin
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/tools/xslt
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes/src
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lib
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins/example
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/css
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/browser
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/clock
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/cpu
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/flags
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/mime
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/os
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/other
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/js
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_f
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_m
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_w
- #mkdir -p $RPM_BUILD_ROOT/usr/share/awstats/lang
- #mkdir -p $RPM_BUILD_ROOT/usr/share/awstats/man
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/docs
- mkdir -p $RPM_BUILD_ROOT/usr/local/awstats/docs/images
- mkdir -p $RPM_BUILD_ROOT/${_sysconfdir}/awstats
- mkdir -p $RPM_BUILD_ROOT/${_sysconfdir}/cron.hourly
- mkdir -p $RPM_BUILD_ROOT/${_sysconfdir}/httpd/conf/extra
- mkdir -p $RPM_BUILD_ROOT/var/lib/awstats
-
- #Arch linux specyfic path:
- install -m 644 tools/httpd_conf $RPM_BUILD_ROOT/${_sysconfdir}/httpd/conf/extra/httpd-awstats.conf
- install -m 744 ../awstats $RPM_BUILD_ROOT/${_sysconfdir}/cron.hourly/awstats
+ msg "Nothing to compile for $pkgname"
+}
+
+package() {
+ _SYSCONFDIR='etc'
+ _WWWROOT='srv/http/awstats'
+ _INSTDIR="usr/share/${pkgname}"
+ _DOCDIR="usr/share/doc/${pkgname}-${pkgver}"
+
+ cd $srcdir/${pkgname}-${pkgver}
+
+ 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
+ mkdir -p $pkgdir/var/lib/$pkgname || return 1
+
+ # Arch Linux specific path:
+ install -Dm644 tools/httpd_conf $pkgdir/${_SYSCONFDIR}/httpd/conf/extra/httpd-awstats.conf || return 1
+ install -Dm744 $srcdir/cron.awstats $pkgdir/${_SYSCONFDIR}/cron.hourly/awstats || return 1
+
+ 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
+
+ # install the documentation
+ cp -ra docs/* $pkgdir/$_DOCDIR/ || return 1
+
+ # www files
+ cp -ra wwwroot/* $pkgdir/$_WWWROOT/ || return 1
+ install -Dm444 README.TXT $pkgdir/$_INSTDIR/README.TXT || return 1
+
+ # fix the default http config
+ sed \
+ -e "s|/usr/local/awstats/wwwroot|/$_WWWROOT|g" \
+ -i $pkgdir/${_SYSCONFDIR}/httpd/conf/extra/httpd-awstats.conf || return 1
- install -m 755 tools/logresolvemerge.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/logresolvemerge.pl
- install -m 755 tools/maillogconvert.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/maillogconvert.pl
- install -m 755 tools/urlaliasbuilder.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/urlaliasbuilder.pl
- install -m 755 tools/awstats_buildstaticpages.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_buildstaticpages.pl
- install -m 755 tools/awstats_configure.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_configure.pl
- install -m 755 tools/awstats_exportlib.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_exportlib.pl
- install -m 755 tools/awstats_updateall.pl $RPM_BUILD_ROOT/usr/local/awstats/tools/awstats_updateall.pl
- install -m 755 tools/webmin/* $RPM_BUILD_ROOT/usr/local/awstats/tools/webmin
- install -m 755 tools/xslt/* $RPM_BUILD_ROOT/usr/local/awstats/tools/xslt
- install -m 755 wwwroot/classes/awgraphapplet.jar $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes/awgraphapplet.jar
- install -m 755 wwwroot/classes/src/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/classes/src
- install -m 755 wwwroot/cgi-bin/awstats.pl $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/awstats.pl
- install -m 755 wwwroot/cgi-bin/awredir.pl $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/awredir.pl
- install -m 755 wwwroot/cgi-bin/lib/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lib
- install -m 755 wwwroot/cgi-bin/plugins/*.pm $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins
- install -m 755 wwwroot/cgi-bin/plugins/example/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/plugins/example
- install -m 644 wwwroot/cgi-bin/awstats.model.conf $RPM_BUILD_ROOT/${_sysconfdir}/awstats/awstats.model.conf
- install -m 444 wwwroot/css/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/css
- install -m 444 wwwroot/icon/browser/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/browser
- install -m 444 wwwroot/icon/clock/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/clock
- install -m 444 wwwroot/icon/cpu/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/cpu
- install -m 444 wwwroot/icon/flags/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/flags
- install -m 444 wwwroot/icon/mime/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/mime
- install -m 444 wwwroot/icon/os/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/os
- install -m 444 wwwroot/icon/other/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/icon/other
- install -m 444 wwwroot/js/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/js
- install -m 444 wwwroot/cgi-bin/lang/tooltips_f/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_f
- install -m 444 wwwroot/cgi-bin/lang/tooltips_m/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_m
- install -m 444 wwwroot/cgi-bin/lang/tooltips_w/* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang/tooltips_w
- install -m 444 wwwroot/cgi-bin/lang/awstats* $RPM_BUILD_ROOT/usr/local/awstats/wwwroot/cgi-bin/lang
- install -m 444 README.TXT $RPM_BUILD_ROOT/usr/local/awstats/README.TXT
- #install -m 644 README.TXT $RPM_BUILD_ROOT/usr/share/awstats/man
- install -m 444 docs/*.* $RPM_BUILD_ROOT/usr/local/awstats/docs
- install -m 444 docs/images/* $RPM_BUILD_ROOT/usr/local/awstats/docs/images
-
- #echo "deny from all" > $RPM_BUILD_ROOT/.htaccess
+ echo "deny from all" > $pkgdir/.htaccess
}
-md5sums=('fc19dbb8449eccf3300efb30ca3376cb'
- '3f81c7ec3a5cc64a669ff98303089b2b')
+# vim:set ts=2 sw=2 et: