wok-current diff awstats/receipt @ rev 2900
Up: usbutils (0.81) and gzip usb.ids
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 05 12:01:51 2009 +0200 (2009-05-05) |
parents | |
children | c616ce6b7873 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/awstats/receipt Tue May 05 12:01:51 2009 +0200 1.3 @@ -0,0 +1,84 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="awstats" 1.7 +VERSION="6.9" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Log file analyzer" 1.10 +MAINTAINER="erjo@slitaz.org" 1.11 +DEPENDS="perl" 1.12 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.13 +WEB_SITE="http://awstats.sourceforge.net/" 1.14 +WGET_URL="http://prdownloads.sourceforge.net/awstats/$TARBALL" 1.15 + 1.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.17 +genpkg_rules() 1.18 +{ 1.19 + mkdir -p $fs/usr/share/awstats/extras \ 1.20 + $fs/var/www/cgi-bin \ 1.21 + $fs/var/lib/awstats \ 1.22 + $fs/etc/awstats \ 1.23 + 1.24 + cp -a $src/wwwroot/classes $fs/usr/share/awstats 1.25 + cp -a $src/wwwroot/css $fs/usr/share/awstats 1.26 + cp -a $src/wwwroot/icon $fs/usr/share/awstats 1.27 + cp -a $src/wwwroot/js $fs/usr/share/awstats 1.28 + cp -a $src/wwwroot/cgi-bin/lang $fs/usr/share/awstats 1.29 + cp -a $src/wwwroot/cgi-bin/lib $fs/usr/share/awstats 1.30 + cp -a $src/wwwroot/cgi-bin/plugins $fs/usr/share/awstats 1.31 + 1.32 + cp -a $src/wwwroot/cgi-bin/awstats.pl $fs/var/www/cgi-bin 1.33 + cp -a $src/wwwroot/cgi-bin/awstats.model.conf $fs/etc/awstats 1.34 + 1.35 + cp stuff/awstats-apache.conf $fs/usr/share/awstats/extras 1.36 + cp stuff/awstats-lighttpd.conf $fs/usr/share/awstats/extras 1.37 +} 1.38 + 1.39 +post_install() 1.40 +{ 1.41 + echo "Processing post-install commands..." 1.42 + # Set lighttpd or apache config 1.43 + if [ -f $1/etc/apache/httpd.conf ]; then 1.44 + if [ ! -f $1/etc/apache/conf.d/awstats.conf ]; then 1.45 + 1.46 + cp /usr/share/awstats/extras/awstats-apache.conf \ 1.47 + /etc/apache/conf.d/awstats.conf 1.48 + fi 1.49 + if [ -z "$1" ]; then 1.50 + # Start Web server if necessary. 1.51 + if [ -f /var/run/apache/httpd.pid ]; then 1.52 + /etc/init.d/apache restart 1.53 + fi 1.54 + fi 1.55 + fi 1.56 + 1.57 + if [ -f $1/etc/lighttpd/lighttpd.conf ]; then 1.58 + if [ ! -f $1/etc/lighttpd/awstats.conf ]; then 1.59 + cp /usr/share/awstats/extras/awstats-lighttpd.conf \ 1.60 + /etc/lighttpd/awstats.conf 1.61 + fi 1.62 + # Start Web server if necessary. 1.63 + if [ -f /var/run/lighttpd.pid ]; then 1.64 + /etc/init.d/lighttpd restart 1.65 + fi 1.66 + fi 1.67 +} 1.68 + 1.69 +post_remove() 1.70 +{ 1.71 + echo "Remove orphan dirctories." 1.72 + [ -d /usr/share/awstats ] && rm -rf /usr/share/awstats 1.73 + 1.74 + # 1.75 + echo "All database and configuratoin files will be removed" 1.76 + echo -n "Please confirm removing (y/N) : "; read answer 1.77 + 1.78 + case $answer in 1.79 + y|Y) 1.80 + rm -rf /var/lib/awstats 1.81 + rm -rf /etc/awstats 1.82 + ;; 1.83 + *) 1.84 + ;; 1.85 + esac 1.86 + 1.87 +}