wok view awstats/receipt @ rev 4836
privoxy: tidy receipt
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sun Jan 24 20:03:53 2010 +0000 (2010-01-24) |
parents | c616ce6b7873 |
children | d815e78b71e4 |
line source
1 # SliTaz package receipt.
3 PACKAGE="awstats"
4 VERSION="6.95"
5 CATEGORY="network"
6 SHORT_DESC="Log file analyzer"
7 MAINTAINER="erjo@slitaz.org"
8 DEPENDS="perl"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://awstats.sourceforge.net/"
11 WGET_URL="http://prdownloads.sourceforge.net/awstats/$TARBALL"
12 TAGS="log analyze web mail ftp"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 mkdir -p $fs/usr/share/awstats/extras \
18 $fs/var/www/cgi-bin \
19 $fs/var/lib/awstats \
20 $fs/etc/awstats \
22 cp -a $src/wwwroot/classes $fs/usr/share/awstats
23 cp -a $src/wwwroot/css $fs/usr/share/awstats
24 cp -a $src/wwwroot/icon $fs/usr/share/awstats
25 cp -a $src/wwwroot/js $fs/usr/share/awstats
26 cp -a $src/wwwroot/cgi-bin/lang $fs/usr/share/awstats
27 cp -a $src/wwwroot/cgi-bin/lib $fs/usr/share/awstats
28 cp -a $src/wwwroot/cgi-bin/plugins $fs/usr/share/awstats
30 cp -a $src/wwwroot/cgi-bin/awstats.pl $fs/var/www/cgi-bin
31 cp -a $src/wwwroot/cgi-bin/awstats.model.conf $fs/etc/awstats
33 cp stuff/awstats-apache.conf $fs/usr/share/awstats/extras
34 cp stuff/awstats-lighttpd.conf $fs/usr/share/awstats/extras
35 }
37 post_install()
38 {
39 echo "Processing post-install commands..."
40 # Set lighttpd or apache config
41 if [ -f $1/etc/apache/httpd.conf ]; then
42 if [ ! -f $1/etc/apache/conf.d/awstats.conf ]; then
44 cp /usr/share/awstats/extras/awstats-apache.conf \
45 /etc/apache/conf.d/awstats.conf
46 fi
47 if [ -z "$1" ]; then
48 # Start Web server if necessary.
49 if [ -f /var/run/apache/httpd.pid ]; then
50 /etc/init.d/apache restart
51 fi
52 fi
53 fi
55 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
56 if [ ! -f $1/etc/lighttpd/awstats.conf ]; then
57 cp /usr/share/awstats/extras/awstats-lighttpd.conf \
58 /etc/lighttpd/awstats.conf
59 fi
60 # Start Web server if necessary.
61 if [ -f /var/run/lighttpd.pid ]; then
62 /etc/init.d/lighttpd restart
63 fi
64 fi
65 }
67 post_remove()
68 {
69 echo "Remove orphan dirctories."
70 [ -d /usr/share/awstats ] && rm -rf /usr/share/awstats
72 #
73 echo "All database and configuratoin files will be removed"
74 echo -n "Please confirm removing (y/N) : "; read answer
76 case $answer in
77 y|Y)
78 rm -rf /var/lib/awstats
79 rm -rf /etc/awstats
80 ;;
81 *)
82 ;;
83 esac
85 }