wok-4.x annotate awstats/receipt @ rev 3274
pcmanfm: Add chinese name and comment to pcmanfm.desktop
author | Chen Yufei <tsjz@ymail.com> |
---|---|
date | Tue Jun 02 12:45:47 2009 +0800 (2009-06-02) |
parents | |
children | c616ce6b7873 |
rev | line source |
---|---|
erjo@2649 | 1 # SliTaz package receipt. |
erjo@2649 | 2 |
erjo@2649 | 3 PACKAGE="awstats" |
erjo@2649 | 4 VERSION="6.9" |
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" |
erjo@2649 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
erjo@2649 | 10 WEB_SITE="http://awstats.sourceforge.net/" |
erjo@2649 | 11 WGET_URL="http://prdownloads.sourceforge.net/awstats/$TARBALL" |
erjo@2649 | 12 |
erjo@2649 | 13 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@2649 | 14 genpkg_rules() |
erjo@2649 | 15 { |
erjo@2649 | 16 mkdir -p $fs/usr/share/awstats/extras \ |
erjo@2649 | 17 $fs/var/www/cgi-bin \ |
erjo@2649 | 18 $fs/var/lib/awstats \ |
erjo@2649 | 19 $fs/etc/awstats \ |
erjo@2649 | 20 |
erjo@2649 | 21 cp -a $src/wwwroot/classes $fs/usr/share/awstats |
erjo@2649 | 22 cp -a $src/wwwroot/css $fs/usr/share/awstats |
erjo@2649 | 23 cp -a $src/wwwroot/icon $fs/usr/share/awstats |
erjo@2649 | 24 cp -a $src/wwwroot/js $fs/usr/share/awstats |
erjo@2649 | 25 cp -a $src/wwwroot/cgi-bin/lang $fs/usr/share/awstats |
erjo@2649 | 26 cp -a $src/wwwroot/cgi-bin/lib $fs/usr/share/awstats |
erjo@2649 | 27 cp -a $src/wwwroot/cgi-bin/plugins $fs/usr/share/awstats |
erjo@2649 | 28 |
erjo@2649 | 29 cp -a $src/wwwroot/cgi-bin/awstats.pl $fs/var/www/cgi-bin |
erjo@2649 | 30 cp -a $src/wwwroot/cgi-bin/awstats.model.conf $fs/etc/awstats |
erjo@2649 | 31 |
erjo@2649 | 32 cp stuff/awstats-apache.conf $fs/usr/share/awstats/extras |
erjo@2649 | 33 cp stuff/awstats-lighttpd.conf $fs/usr/share/awstats/extras |
erjo@2649 | 34 } |
erjo@2649 | 35 |
erjo@2649 | 36 post_install() |
erjo@2649 | 37 { |
erjo@2649 | 38 echo "Processing post-install commands..." |
erjo@2649 | 39 # Set lighttpd or apache config |
erjo@2649 | 40 if [ -f $1/etc/apache/httpd.conf ]; then |
erjo@2649 | 41 if [ ! -f $1/etc/apache/conf.d/awstats.conf ]; then |
erjo@2649 | 42 |
erjo@2649 | 43 cp /usr/share/awstats/extras/awstats-apache.conf \ |
erjo@2649 | 44 /etc/apache/conf.d/awstats.conf |
erjo@2649 | 45 fi |
erjo@2649 | 46 if [ -z "$1" ]; then |
erjo@2649 | 47 # Start Web server if necessary. |
erjo@2649 | 48 if [ -f /var/run/apache/httpd.pid ]; then |
erjo@2649 | 49 /etc/init.d/apache restart |
erjo@2649 | 50 fi |
erjo@2649 | 51 fi |
erjo@2649 | 52 fi |
erjo@2649 | 53 |
erjo@2649 | 54 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
erjo@2649 | 55 if [ ! -f $1/etc/lighttpd/awstats.conf ]; then |
erjo@2649 | 56 cp /usr/share/awstats/extras/awstats-lighttpd.conf \ |
erjo@2649 | 57 /etc/lighttpd/awstats.conf |
erjo@2649 | 58 fi |
erjo@2649 | 59 # Start Web server if necessary. |
erjo@2649 | 60 if [ -f /var/run/lighttpd.pid ]; then |
erjo@2649 | 61 /etc/init.d/lighttpd restart |
erjo@2649 | 62 fi |
erjo@2649 | 63 fi |
erjo@2649 | 64 } |
erjo@2649 | 65 |
erjo@2649 | 66 post_remove() |
erjo@2649 | 67 { |
erjo@2649 | 68 echo "Remove orphan dirctories." |
erjo@2649 | 69 [ -d /usr/share/awstats ] && rm -rf /usr/share/awstats |
erjo@2649 | 70 |
erjo@2649 | 71 # |
erjo@2649 | 72 echo "All database and configuratoin files will be removed" |
erjo@2649 | 73 echo -n "Please confirm removing (y/N) : "; read answer |
erjo@2649 | 74 |
erjo@2649 | 75 case $answer in |
erjo@2649 | 76 y|Y) |
erjo@2649 | 77 rm -rf /var/lib/awstats |
erjo@2649 | 78 rm -rf /etc/awstats |
erjo@2649 | 79 ;; |
erjo@2649 | 80 *) |
erjo@2649 | 81 ;; |
erjo@2649 | 82 esac |
erjo@2649 | 83 |
erjo@2649 | 84 } |