mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 02:27:15 +08:00
adding awstats 7.0, tool that generates web, streaming, ftp and mail server statistics, graphically
This commit is contained in:
parent
195bebee94
commit
c0521a4bd3
70
awstats/PKGBUILD
Normal file
70
awstats/PKGBUILD
Normal file
@ -0,0 +1,70 @@
|
||||
# Apps Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
pkgname=awstats
|
||||
pkgver=7.0
|
||||
pkgrel=1
|
||||
pkgdesc="tool that generates web, streaming, ftp and mail server statistics, graphically"
|
||||
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')
|
||||
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")
|
||||
md5sums=('3e8e09b9ebe74513bb34290dbcd37b45'
|
||||
'2103e3d97f8b4ff31cd4022c4ee839f7')
|
||||
|
||||
build() {
|
||||
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 -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
|
||||
|
||||
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
|
||||
rm -f $pkgdir/$_WWWROOT/cgi-bin/awstats.model.conf || 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
|
||||
|
||||
echo "deny from all" > $pkgdir/.htaccess
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
25
awstats/awstats.install
Normal file
25
awstats/awstats.install
Normal file
@ -0,0 +1,25 @@
|
||||
# arg 1: the new package version
|
||||
post_install() {
|
||||
echo \(/usr/local/awstats/docs/index.html\) to setup AWStats in 3 steps:
|
||||
echo Step 1 : Install and Setup with awstats_configure.pl
|
||||
echo or add : Include /etc/httpd/conf/extra/httpd-awstats.conf
|
||||
echo to /etc/httpd/conf/httpd.conf
|
||||
echo Step 2 : Build/Update Statistics with awstats.pl
|
||||
echo Step 3 : Read Statistics
|
||||
}
|
||||
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
|
||||
chmod -R og+r /var/lib/awstats
|
||||
chown -R root:root /var/lib/awstats
|
||||
}
|
||||
|
||||
op=$1
|
||||
shift
|
||||
|
||||
$op $*
|
||||
|
||||
# vim: ts=2: ft=sh
|
6
awstats/cron.awstats
Normal file
6
awstats/cron.awstats
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
/usr/share/awstats/tools/awstats_updateall.pl now \
|
||||
-configdir=/etc/awstats \
|
||||
-awstatsprog=/srv/http/awstats/cgi-bin/awstats.pl > /dev/null
|
||||
|
||||
chmod -R og+r /var/lib/awstats
|
Loading…
Reference in New Issue
Block a user