wok-4.x view awstats/receipt @ rev 5204
Add perl-net-xwhois
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Mar 30 10:54:38 2010 +0200 (2010-03-30) |
parents | d815e78b71e4 |
children | e21766a94165 |
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 SUGGESTED="perl-net-xwhois"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://awstats.sourceforge.net/"
12 WGET_URL="http://prdownloads.sourceforge.net/awstats/$TARBALL"
13 TAGS="log analyze web mail ftp"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 mkdir -p $fs/usr/share/awstats/extras \
19 $fs/var/www/cgi-bin \
20 $fs/var/lib/awstats \
21 $fs/etc/awstats \
23 cp -a $src/wwwroot/classes $fs/usr/share/awstats
24 cp -a $src/wwwroot/css $fs/usr/share/awstats
25 cp -a $src/wwwroot/icon $fs/usr/share/awstats
26 cp -a $src/wwwroot/js $fs/usr/share/awstats
27 cp -a $src/wwwroot/cgi-bin/lang $fs/usr/share/awstats
28 cp -a $src/wwwroot/cgi-bin/lib $fs/usr/share/awstats
29 cp -a $src/wwwroot/cgi-bin/plugins $fs/usr/share/awstats
31 cp -a $src/wwwroot/cgi-bin/awstats.pl $fs/var/www/cgi-bin
32 cp -a $src/wwwroot/cgi-bin/awstats.model.conf $fs/etc/awstats
34 cp stuff/awstats-apache.conf $fs/usr/share/awstats/extras
35 cp stuff/awstats-lighttpd.conf $fs/usr/share/awstats/extras
36 }
38 post_install()
39 {
40 echo "Processing post-install commands..."
41 # Set lighttpd or apache config
42 if [ -f $1/etc/apache/httpd.conf ]; then
43 if [ ! -f $1/etc/apache/conf.d/awstats.conf ]; then
45 cp $1/usr/share/awstats/extras/awstats-apache.conf \
46 $1/etc/apache/conf.d/awstats.conf
47 fi
48 if [ -z "$1" ]; then
49 # Start Web server if necessary.
50 if [ -f /var/run/apache/httpd.pid ]; then
51 /etc/init.d/apache restart
52 fi
53 fi
54 fi
56 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
57 if [ ! -f $1/etc/lighttpd/awstats.conf ]; then
58 cp $1/usr/share/awstats/extras/awstats-lighttpd.conf \
59 $1/etc/lighttpd/awstats.conf
60 fi
61 # Start Web server if necessary.
62 if [ -f /var/run/lighttpd.pid ]; then
63 /etc/init.d/lighttpd restart
64 fi
65 fi
66 }
68 post_remove()
69 {
70 echo "Remove orphan dirctories."
71 [ -d /usr/share/awstats ] && rm -rf /usr/share/awstats
73 #
74 echo "All database and configuratoin files will be removed"
75 echo -n "Please confirm removing (y/N) : "; read answer
77 case $answer in
78 y|Y)
79 rm -rf /var/lib/awstats
80 rm -rf /etc/awstats
81 ;;
82 *)
83 ;;
84 esac
86 }