wok view awstats/receipt @ rev 3021
liunx: add sc92031 support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon May 11 22:46:46 2009 +0200 (2009-05-11) |
parents | |
children | c616ce6b7873 |
line source
1 # SliTaz package receipt.
3 PACKAGE="awstats"
4 VERSION="6.9"
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"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
14 genpkg_rules()
15 {
16 mkdir -p $fs/usr/share/awstats/extras \
17 $fs/var/www/cgi-bin \
18 $fs/var/lib/awstats \
19 $fs/etc/awstats \
21 cp -a $src/wwwroot/classes $fs/usr/share/awstats
22 cp -a $src/wwwroot/css $fs/usr/share/awstats
23 cp -a $src/wwwroot/icon $fs/usr/share/awstats
24 cp -a $src/wwwroot/js $fs/usr/share/awstats
25 cp -a $src/wwwroot/cgi-bin/lang $fs/usr/share/awstats
26 cp -a $src/wwwroot/cgi-bin/lib $fs/usr/share/awstats
27 cp -a $src/wwwroot/cgi-bin/plugins $fs/usr/share/awstats
29 cp -a $src/wwwroot/cgi-bin/awstats.pl $fs/var/www/cgi-bin
30 cp -a $src/wwwroot/cgi-bin/awstats.model.conf $fs/etc/awstats
32 cp stuff/awstats-apache.conf $fs/usr/share/awstats/extras
33 cp stuff/awstats-lighttpd.conf $fs/usr/share/awstats/extras
34 }
36 post_install()
37 {
38 echo "Processing post-install commands..."
39 # Set lighttpd or apache config
40 if [ -f $1/etc/apache/httpd.conf ]; then
41 if [ ! -f $1/etc/apache/conf.d/awstats.conf ]; then
43 cp /usr/share/awstats/extras/awstats-apache.conf \
44 /etc/apache/conf.d/awstats.conf
45 fi
46 if [ -z "$1" ]; then
47 # Start Web server if necessary.
48 if [ -f /var/run/apache/httpd.pid ]; then
49 /etc/init.d/apache restart
50 fi
51 fi
52 fi
54 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
55 if [ ! -f $1/etc/lighttpd/awstats.conf ]; then
56 cp /usr/share/awstats/extras/awstats-lighttpd.conf \
57 /etc/lighttpd/awstats.conf
58 fi
59 # Start Web server if necessary.
60 if [ -f /var/run/lighttpd.pid ]; then
61 /etc/init.d/lighttpd restart
62 fi
63 fi
64 }
66 post_remove()
67 {
68 echo "Remove orphan dirctories."
69 [ -d /usr/share/awstats ] && rm -rf /usr/share/awstats
71 #
72 echo "All database and configuratoin files will be removed"
73 echo -n "Please confirm removing (y/N) : "; read answer
75 case $answer in
76 y|Y)
77 rm -rf /var/lib/awstats
78 rm -rf /etc/awstats
79 ;;
80 *)
81 ;;
82 esac
84 }