wok-6.x annotate awstats/receipt @ rev 5775
Up: slitaz-tools-boxes 3.8.1
author | Antoine Bodin <gokhlayeh@mailoo.org> |
---|---|
date | Wed Jul 07 19:33:09 2010 +0200 (2010-07-07) |
parents | 92ad1f7ee59a |
children | 2fce698e019b |
rev | line source |
---|---|
erjo@2649 | 1 # SliTaz package receipt. |
erjo@2649 | 2 |
erjo@2649 | 3 PACKAGE="awstats" |
erjo@4690 | 4 VERSION="6.95" |
erjo@2649 | 5 CATEGORY="network" |
erjo@2649 | 6 SHORT_DESC="Log file analyzer" |
erjo@2649 | 7 MAINTAINER="erjo@slitaz.org" |
erjo@2649 | 8 DEPENDS="perl" |
pascal@5204 | 9 SUGGESTED="perl-net-xwhois" |
erjo@2649 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
erjo@2649 | 11 WEB_SITE="http://awstats.sourceforge.net/" |
erjo@2649 | 12 WGET_URL="http://prdownloads.sourceforge.net/awstats/$TARBALL" |
jozee@3564 | 13 TAGS="log analyze web mail ftp" |
erjo@2649 | 14 |
erjo@2649 | 15 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@2649 | 16 genpkg_rules() |
erjo@2649 | 17 { |
erjo@2649 | 18 mkdir -p $fs/usr/share/awstats/extras \ |
erjo@2649 | 19 $fs/var/www/cgi-bin \ |
erjo@2649 | 20 $fs/var/lib/awstats \ |
erjo@2649 | 21 $fs/etc/awstats \ |
erjo@2649 | 22 |
erjo@2649 | 23 cp -a $src/wwwroot/classes $fs/usr/share/awstats |
erjo@2649 | 24 cp -a $src/wwwroot/css $fs/usr/share/awstats |
erjo@2649 | 25 cp -a $src/wwwroot/icon $fs/usr/share/awstats |
erjo@2649 | 26 cp -a $src/wwwroot/js $fs/usr/share/awstats |
erjo@2649 | 27 cp -a $src/wwwroot/cgi-bin/lang $fs/usr/share/awstats |
erjo@2649 | 28 cp -a $src/wwwroot/cgi-bin/lib $fs/usr/share/awstats |
erjo@2649 | 29 cp -a $src/wwwroot/cgi-bin/plugins $fs/usr/share/awstats |
erjo@2649 | 30 |
erjo@2649 | 31 cp -a $src/wwwroot/cgi-bin/awstats.pl $fs/var/www/cgi-bin |
erjo@2649 | 32 cp -a $src/wwwroot/cgi-bin/awstats.model.conf $fs/etc/awstats |
erjo@2649 | 33 |
erjo@2649 | 34 cp stuff/awstats-apache.conf $fs/usr/share/awstats/extras |
erjo@2649 | 35 cp stuff/awstats-lighttpd.conf $fs/usr/share/awstats/extras |
pascal@5205 | 36 |
pascal@5205 | 37 # Add a link using google map |
pascal@5205 | 38 sed -i 's|Full Whois Field"|Full Whois Field <a href=\\"http://en.utrace.de/?query=".$HostResolved."\\">?</a>"|' \ |
pascal@5205 | 39 $fs/usr/share/awstats/plugins/hostinfo.pm |
erjo@2649 | 40 } |
erjo@2649 | 41 |
erjo@2649 | 42 post_install() |
erjo@2649 | 43 { |
erjo@2649 | 44 echo "Processing post-install commands..." |
erjo@2649 | 45 # Set lighttpd or apache config |
erjo@2649 | 46 if [ -f $1/etc/apache/httpd.conf ]; then |
erjo@2649 | 47 if [ ! -f $1/etc/apache/conf.d/awstats.conf ]; then |
erjo@2649 | 48 |
pascal@5086 | 49 cp $1/usr/share/awstats/extras/awstats-apache.conf \ |
pascal@5086 | 50 $1/etc/apache/conf.d/awstats.conf |
erjo@2649 | 51 fi |
erjo@2649 | 52 if [ -z "$1" ]; then |
erjo@2649 | 53 # Start Web server if necessary. |
erjo@2649 | 54 if [ -f /var/run/apache/httpd.pid ]; then |
erjo@2649 | 55 /etc/init.d/apache restart |
erjo@2649 | 56 fi |
erjo@2649 | 57 fi |
erjo@2649 | 58 fi |
erjo@2649 | 59 |
erjo@2649 | 60 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
erjo@2649 | 61 if [ ! -f $1/etc/lighttpd/awstats.conf ]; then |
pascal@5086 | 62 cp $1/usr/share/awstats/extras/awstats-lighttpd.conf \ |
pascal@5086 | 63 $1/etc/lighttpd/awstats.conf |
erjo@2649 | 64 fi |
erjo@2649 | 65 # Start Web server if necessary. |
erjo@2649 | 66 if [ -f /var/run/lighttpd.pid ]; then |
erjo@2649 | 67 /etc/init.d/lighttpd restart |
erjo@2649 | 68 fi |
erjo@2649 | 69 fi |
erjo@2649 | 70 } |
erjo@2649 | 71 |
erjo@2649 | 72 post_remove() |
erjo@2649 | 73 { |
erjo@2649 | 74 echo "Remove orphan dirctories." |
erjo@2649 | 75 [ -d /usr/share/awstats ] && rm -rf /usr/share/awstats |
erjo@2649 | 76 |
erjo@2649 | 77 # |
erjo@2649 | 78 echo "All database and configuratoin files will be removed" |
erjo@2649 | 79 echo -n "Please confirm removing (y/N) : "; read answer |
erjo@2649 | 80 |
erjo@2649 | 81 case $answer in |
erjo@2649 | 82 y|Y) |
erjo@2649 | 83 rm -rf /var/lib/awstats |
erjo@2649 | 84 rm -rf /etc/awstats |
erjo@2649 | 85 ;; |
erjo@2649 | 86 *) |
erjo@2649 | 87 ;; |
erjo@2649 | 88 esac |
erjo@2649 | 89 |
erjo@2649 | 90 } |