wok-current view awstats/receipt @ rev 5952
Up: cpufrequtils 008
author | Antoine Bodin <gokhlayeh@mailoo.org> |
---|---|
date | Tue Aug 03 22:22:48 2010 +0200 (2010-08-03) |
parents | 92ad1f7ee59a |
children | 2fce698e019b |
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
37 # Add a link using google map
38 sed -i 's|Full Whois Field"|Full Whois Field <a href=\\"http://en.utrace.de/?query=".$HostResolved."\\">?</a>"|' \
39 $fs/usr/share/awstats/plugins/hostinfo.pm
40 }
42 post_install()
43 {
44 echo "Processing post-install commands..."
45 # Set lighttpd or apache config
46 if [ -f $1/etc/apache/httpd.conf ]; then
47 if [ ! -f $1/etc/apache/conf.d/awstats.conf ]; then
49 cp $1/usr/share/awstats/extras/awstats-apache.conf \
50 $1/etc/apache/conf.d/awstats.conf
51 fi
52 if [ -z "$1" ]; then
53 # Start Web server if necessary.
54 if [ -f /var/run/apache/httpd.pid ]; then
55 /etc/init.d/apache restart
56 fi
57 fi
58 fi
60 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
61 if [ ! -f $1/etc/lighttpd/awstats.conf ]; then
62 cp $1/usr/share/awstats/extras/awstats-lighttpd.conf \
63 $1/etc/lighttpd/awstats.conf
64 fi
65 # Start Web server if necessary.
66 if [ -f /var/run/lighttpd.pid ]; then
67 /etc/init.d/lighttpd restart
68 fi
69 fi
70 }
72 post_remove()
73 {
74 echo "Remove orphan dirctories."
75 [ -d /usr/share/awstats ] && rm -rf /usr/share/awstats
77 #
78 echo "All database and configuratoin files will be removed"
79 echo -n "Please confirm removing (y/N) : "; read answer
81 case $answer in
82 y|Y)
83 rm -rf /var/lib/awstats
84 rm -rf /etc/awstats
85 ;;
86 *)
87 ;;
88 esac
90 }