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