wok-6.x diff awstats/receipt @ rev 14838

xfdesktop: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 17 16:35:50 2013 +0200 (2013-07-17)
parents 3c6cad69d34c
children f4c22f009037
line diff
     1.1 --- a/awstats/receipt	Mon Oct 17 00:42:47 2011 +0000
     1.2 +++ b/awstats/receipt	Wed Jul 17 16:35:50 2013 +0200
     1.3 @@ -5,12 +5,13 @@
     1.4  CATEGORY="network"
     1.5  SHORT_DESC="Log file analyzer"
     1.6  MAINTAINER="erjo@slitaz.org"
     1.7 +WEB_SITE="http://awstats.sourceforge.net/"
     1.8 +TARBALL="$PACKAGE-$VERSION.tar.gz"
     1.9 +WGET_URL="http://prdownloads.sourceforge.net/awstats/$TARBALL"
    1.10 +TAGS="log analyze web mail ftp"
    1.11 +
    1.12  DEPENDS="perl"
    1.13  SUGGESTED="perl-net-xwhois"
    1.14 -TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.15 -WEB_SITE="http://awstats.sourceforge.net/"
    1.16 -WGET_URL="http://prdownloads.sourceforge.net/awstats/$TARBALL"
    1.17 -TAGS="log analyze web mail ftp"
    1.18  
    1.19  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.20  genpkg_rules()
    1.21 @@ -19,7 +20,7 @@
    1.22  		$fs/var/www/cgi-bin \
    1.23  		$fs/var/lib/awstats \
    1.24  		$fs/etc/awstats \
    1.25 -		
    1.26 +
    1.27  	cp -a $src/wwwroot/classes $fs/usr/share/awstats
    1.28  	cp -a $src/wwwroot/css $fs/usr/share/awstats
    1.29  	cp -a $src/wwwroot/icon $fs/usr/share/awstats
    1.30 @@ -27,17 +28,17 @@
    1.31  	cp -a $src/wwwroot/cgi-bin/lang $fs/usr/share/awstats
    1.32  	cp -a $src/wwwroot/cgi-bin/lib $fs/usr/share/awstats
    1.33  	cp -a $src/wwwroot/cgi-bin/plugins $fs/usr/share/awstats
    1.34 -	
    1.35 +
    1.36  	cp -a $src/wwwroot/cgi-bin/awstats.pl  $fs/var/www/cgi-bin
    1.37  	cp -a $src/wwwroot/cgi-bin/awstats.model.conf  $fs/etc/awstats
    1.38 -	
    1.39 +
    1.40  	cp $stuff/* $fs/usr/share/awstats/extras
    1.41  
    1.42  	# Add a link using google map
    1.43  	sed -i 's|Full Whois Field"|Full Whois Field <a href=\\"http://en.utrace.de/?query=".$HostResolved."\\">?</a>"|' \
    1.44  		$fs/usr/share/awstats/plugins/hostinfo.pm
    1.45  
    1.46 -	# Avoid alias conflits
    1.47 +	# Avoid alias conflicts
    1.48  	for i in classes css icon ; do
    1.49  		sed -i "s| /$i| /awstats$i|" \
    1.50  			$fs/usr/share/awstats/extras/awstats-apache.conf
    1.51 @@ -48,11 +49,18 @@
    1.52  		$fs/etc/awstats/awstats.model.conf
    1.53  	sed -i 's/classes/awstatsclasses/' \
    1.54  		$fs/usr/share/awstats/plugins/graphapplet.pm
    1.55 +
    1.56 +	chown -R root:root $fs
    1.57 +	find $fs -type f -exec chmod a-x \{\} \;
    1.58 +	chmod a+x \
    1.59 +		$fs/usr/share/awstats/extras/update \
    1.60 +		$fs/var/www/cgi-bin/awstats.pl \
    1.61 +		$fs/usr/share/awstats/classes/src/Makefile.pl
    1.62  }
    1.63  
    1.64  post_install()
    1.65  {
    1.66 -    echo "Processing post-install commands..."
    1.67 +	echo "Processing post-install commands..."
    1.68  	# Set lighttpd or apache config
    1.69  	if [ -f $1/etc/apache/httpd.conf ]; then
    1.70  		if [ ! -f $1/etc/apache/conf.d/awstats.conf ]; then
    1.71 @@ -71,7 +79,7 @@
    1.72  	if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
    1.73  		if [ ! -f $1/etc/lighttpd/awstats.conf ]; then
    1.74  			cp $1/usr/share/awstats/extras/awstats-lighttpd.conf \
    1.75 -				$1/etc/lighttpd/awstats.conf			
    1.76 +				$1/etc/lighttpd/awstats.conf
    1.77  		fi
    1.78  					# Start Web server if necessary.
    1.79  		if [ -f /var/run/lighttpd.pid ]; then
    1.80 @@ -89,18 +97,17 @@
    1.81  {
    1.82  		echo "Remove orphan dirctories."
    1.83  		[ -d /usr/share/awstats ] && rm -rf /usr/share/awstats
    1.84 -		
    1.85 +
    1.86  		# 
    1.87  		echo "All database and configuratoin files will be removed"
    1.88  		echo -n "Please confirm removing (y/N) : "; read answer
    1.89 -		
    1.90 +
    1.91  		case $answer in 
    1.92 -		y|Y)
    1.93 -			rm -rf /var/lib/awstats
    1.94 -			rm -rf /etc/awstats
    1.95 -			;;
    1.96 -		*)
    1.97 -			;;
    1.98 +			y|Y)
    1.99 +				rm -rf /var/lib/awstats
   1.100 +				rm -rf /etc/awstats
   1.101 +				;;
   1.102 +			*)
   1.103 +				;;
   1.104  		esac
   1.105 -		
   1.106  }