wok-current view awstats/receipt @ rev 21215

updated scim-pinyin again (0.5.91 -> 0.5.92)
author Hans-G?nter Theisgen
date Tue Apr 09 17:31:14 2019 +0100 (2019-04-09)
parents 9e2e108fff96
children 7aa14b7a600c
line source
1 # SliTaz package receipt.
3 PACKAGE="awstats"
4 VERSION="7.7"
5 CATEGORY="network"
6 TAGS="log analysis web mail ftp"
7 SHORT_DESC="Log file analyzer"
8 MAINTAINER="erjo@slitaz.org"
9 LICENSE="GPL"
10 WEB_SITE="http://awstats.sourceforge.net/"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://downloads.sourceforge.net/project/$PACKAGE/AWStats/$VERSION/$TARBALL"
15 DEPENDS="perl"
16 SUGGESTED="perl-net-xwhois perl-geo-ipfree"
18 # Rules to gen a SliTaz package suitable for Tazpkg.
19 genpkg_rules()
20 {
21 mkdir -p $fs/usr/share/awstats/extras \
22 $fs/var/www/cgi-bin \
23 $fs/var/lib/awstats \
24 $fs/etc/awstats \
26 cp -a $src/wwwroot/classes $fs/usr/share/awstats
27 cp -a $src/wwwroot/css $fs/usr/share/awstats
28 cp -a $src/wwwroot/icon $fs/usr/share/awstats
29 cp -a $src/wwwroot/js $fs/usr/share/awstats
30 cp -a $src/wwwroot/cgi-bin/lang $fs/usr/share/awstats
31 cp -a $src/wwwroot/cgi-bin/lib $fs/usr/share/awstats
32 cp -a $src/wwwroot/cgi-bin/plugins $fs/usr/share/awstats
34 cp -a $src/wwwroot/cgi-bin/awstats.pl $fs/var/www/cgi-bin
35 cp -a $src/wwwroot/cgi-bin/awstats.model.conf $fs/etc/awstats
37 cp $stuff/* $fs/usr/share/awstats/extras
39 # Add a link using google map
40 sed -i 's|Full Whois Field"|Full Whois Field <a href=\\"http://en.utrace.de/?query=".$HostResolved."\\">?</a>"|' \
41 $fs/usr/share/awstats/plugins/hostinfo.pm
43 # Avoid alias conflicts
44 for i in classes css icon ; do
45 sed -i "s| /$i| /awstats$i|" \
46 $fs/usr/share/awstats/extras/awstats-apache.conf
47 sed -i "s|\"/$i|\"/awstats$i|" \
48 $fs/usr/share/awstats/extras/awstats-lighttpd.conf
49 done
50 sed -i -e '/\/css\//d' -e 's|DirIcons="/icon"|DirIcons="/awstatsicon"|' \
51 $fs/etc/awstats/awstats.model.conf
52 sed -i 's/classes/awstatsclasses/' \
53 $fs/usr/share/awstats/plugins/graphapplet.pm
55 chown -R root:root $fs
56 find $fs -type f -exec chmod a-x \{\} \;
57 chmod a+x \
58 $fs/usr/share/awstats/extras/update \
59 $fs/var/www/cgi-bin/awstats.pl \
60 $fs/usr/share/awstats/classes/src/Makefile.pl
61 }
63 post_install()
64 {
65 # Set lighttpd or apache config
66 if [ -f "$1/etc/apache/httpd.conf" ]; then
67 if [ ! -f "$1/etc/apache/conf.d/awstats.conf" ]; then
69 cp "$1/usr/share/awstats/extras/awstats-apache.conf" \
70 "$1/etc/apache/conf.d/awstats.conf"
71 fi
72 if [ -z "$1" ]; then
73 # Start Web server if necessary.
74 if [ -f /var/run/apache/httpd.pid ]; then
75 /etc/init.d/apache restart
76 fi
77 fi
78 fi
80 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
81 if [ ! -f "$1/etc/lighttpd/awstats.conf" ]; then
82 cp "$1/usr/share/awstats/extras/awstats-lighttpd.conf" \
83 "$1/etc/lighttpd/awstats.conf"
84 fi
85 # Start Web server if necessary.
86 if [ -f /var/run/lighttpd.pid ]; then
87 /etc/init.d/lighttpd restart
88 fi
89 fi
90 [ "$quiet" ] || cat <<EOT
92 You should add in your crontab something like;
94 0 0 * * * /usr/share/awstats/extras/update
95 EOT
96 }
98 post_remove()
99 {
100 echo "Remove orphan dirctories."
101 [ -d /usr/share/awstats ] && rm -rf /usr/share/awstats
103 # FIXME
104 echo "All database and configuratoin files will be removed"
105 echo -n "Please confirm removing (y/N) : "; read answer
107 case $answer in
108 y|Y)
109 rm -rf /var/lib/awstats
110 rm -rf /etc/awstats
111 ;;
112 *)
113 ;;
114 esac
115 }