wok annotate awstats/receipt @ rev 19765
xfig, transfig: use png_set_dither with libpng
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 20 09:30:03 2017 +0100 (2017-02-20) |
parents | a6f7b6b890c2 |
children | ffecf6ac8f6b |
rev | line source |
---|---|
erjo@2649 | 1 # SliTaz package receipt. |
erjo@2649 | 2 |
erjo@2649 | 3 PACKAGE="awstats" |
slaxemulator@11065 | 4 VERSION="7.0" |
erjo@2649 | 5 CATEGORY="network" |
erjo@2649 | 6 SHORT_DESC="Log file analyzer" |
erjo@2649 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15201 | 8 LICENSE="GPL" |
al@14789 | 9 WEB_SITE="http://awstats.sourceforge.net/" |
al@14789 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
al@14789 | 11 WGET_URL="http://prdownloads.sourceforge.net/awstats/$TARBALL" |
al@19168 | 12 TAGS="log analysis web mail ftp" |
al@14789 | 13 |
erjo@2649 | 14 DEPENDS="perl" |
pascal@19441 | 15 SUGGESTED="perl-net-xwhois perl-geo-ipfree" |
erjo@2649 | 16 |
erjo@2649 | 17 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@2649 | 18 genpkg_rules() |
erjo@2649 | 19 { |
erjo@2649 | 20 mkdir -p $fs/usr/share/awstats/extras \ |
erjo@2649 | 21 $fs/var/www/cgi-bin \ |
erjo@2649 | 22 $fs/var/lib/awstats \ |
erjo@2649 | 23 $fs/etc/awstats \ |
al@14789 | 24 |
erjo@2649 | 25 cp -a $src/wwwroot/classes $fs/usr/share/awstats |
erjo@2649 | 26 cp -a $src/wwwroot/css $fs/usr/share/awstats |
erjo@2649 | 27 cp -a $src/wwwroot/icon $fs/usr/share/awstats |
erjo@2649 | 28 cp -a $src/wwwroot/js $fs/usr/share/awstats |
erjo@2649 | 29 cp -a $src/wwwroot/cgi-bin/lang $fs/usr/share/awstats |
erjo@2649 | 30 cp -a $src/wwwroot/cgi-bin/lib $fs/usr/share/awstats |
erjo@2649 | 31 cp -a $src/wwwroot/cgi-bin/plugins $fs/usr/share/awstats |
al@14789 | 32 |
erjo@2649 | 33 cp -a $src/wwwroot/cgi-bin/awstats.pl $fs/var/www/cgi-bin |
erjo@2649 | 34 cp -a $src/wwwroot/cgi-bin/awstats.model.conf $fs/etc/awstats |
al@14789 | 35 |
pankso@9697 | 36 cp $stuff/* $fs/usr/share/awstats/extras |
pascal@5205 | 37 |
pascal@5205 | 38 # Add a link using google map |
pascal@5205 | 39 sed -i 's|Full Whois Field"|Full Whois Field <a href=\\"http://en.utrace.de/?query=".$HostResolved."\\">?</a>"|' \ |
pascal@5205 | 40 $fs/usr/share/awstats/plugins/hostinfo.pm |
pascal@5959 | 41 |
al@14789 | 42 # Avoid alias conflicts |
pascal@5959 | 43 for i in classes css icon ; do |
pascal@5959 | 44 sed -i "s| /$i| /awstats$i|" \ |
pascal@5959 | 45 $fs/usr/share/awstats/extras/awstats-apache.conf |
pascal@5959 | 46 sed -i "s|\"/$i|\"/awstats$i|" \ |
pascal@5959 | 47 $fs/usr/share/awstats/extras/awstats-lighttpd.conf |
pascal@5959 | 48 done |
pascal@5959 | 49 sed -i -e '/\/css\//d' -e 's|DirIcons="/icon"|DirIcons="/awstatsicon"|' \ |
pascal@5959 | 50 $fs/etc/awstats/awstats.model.conf |
pascal@5959 | 51 sed -i 's/classes/awstatsclasses/' \ |
pascal@5959 | 52 $fs/usr/share/awstats/plugins/graphapplet.pm |
al@14789 | 53 |
al@14789 | 54 chown -R root:root $fs |
al@14789 | 55 find $fs -type f -exec chmod a-x \{\} \; |
al@14789 | 56 chmod a+x \ |
al@14789 | 57 $fs/usr/share/awstats/extras/update \ |
al@14789 | 58 $fs/var/www/cgi-bin/awstats.pl \ |
al@14789 | 59 $fs/usr/share/awstats/classes/src/Makefile.pl |
erjo@2649 | 60 } |
erjo@2649 | 61 |
erjo@2649 | 62 post_install() |
erjo@2649 | 63 { |
erjo@2649 | 64 # Set lighttpd or apache config |
pascal@18730 | 65 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@18730 | 66 if [ ! -f "$1/etc/apache/conf.d/awstats.conf" ]; then |
erjo@2649 | 67 |
pascal@18730 | 68 cp "$1/usr/share/awstats/extras/awstats-apache.conf" \ |
pascal@18730 | 69 "$1/etc/apache/conf.d/awstats.conf" |
erjo@2649 | 70 fi |
erjo@2649 | 71 if [ -z "$1" ]; then |
erjo@2649 | 72 # Start Web server if necessary. |
erjo@2649 | 73 if [ -f /var/run/apache/httpd.pid ]; then |
erjo@2649 | 74 /etc/init.d/apache restart |
erjo@2649 | 75 fi |
erjo@2649 | 76 fi |
erjo@2649 | 77 fi |
erjo@2649 | 78 |
pascal@18730 | 79 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@18730 | 80 if [ ! -f "$1/etc/lighttpd/awstats.conf" ]; then |
pascal@18730 | 81 cp "$1/usr/share/awstats/extras/awstats-lighttpd.conf" \ |
pascal@18730 | 82 "$1/etc/lighttpd/awstats.conf" |
erjo@2649 | 83 fi |
erjo@2649 | 84 # Start Web server if necessary. |
erjo@2649 | 85 if [ -f /var/run/lighttpd.pid ]; then |
erjo@2649 | 86 /etc/init.d/lighttpd restart |
erjo@2649 | 87 fi |
erjo@2649 | 88 fi |
pascal@18707 | 89 [ "$quiet" ] || cat <<EOT |
al@18667 | 90 |
pascal@5959 | 91 You should add in your crontab something like; |
pascal@5959 | 92 |
pascal@5959 | 93 0 0 * * * /usr/share/awstats/extras/update |
pascal@5959 | 94 EOT |
erjo@2649 | 95 } |
erjo@2649 | 96 |
erjo@2649 | 97 post_remove() |
erjo@2649 | 98 { |
erjo@2649 | 99 echo "Remove orphan dirctories." |
erjo@2649 | 100 [ -d /usr/share/awstats ] && rm -rf /usr/share/awstats |
al@14789 | 101 |
al@18667 | 102 # FIXME |
erjo@2649 | 103 echo "All database and configuratoin files will be removed" |
erjo@2649 | 104 echo -n "Please confirm removing (y/N) : "; read answer |
al@14789 | 105 |
al@18667 | 106 case $answer in |
al@14789 | 107 y|Y) |
al@14789 | 108 rm -rf /var/lib/awstats |
al@14789 | 109 rm -rf /etc/awstats |
al@14789 | 110 ;; |
al@14789 | 111 *) |
al@14789 | 112 ;; |
erjo@2649 | 113 esac |
erjo@2649 | 114 } |