wok-6.x annotate webalizer/receipt @ rev 24495
updated dolibarr again (10.0.6 -> 14.0.5)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Feb 19 13:42:19 2022 +0100 (2022-02-19) |
parents | 78bc4b109dd6 |
children | df63c4ce07f8 |
rev | line source |
---|---|
pascal@1676 | 1 # SliTaz package receipt. |
pascal@1676 | 2 |
pascal@1676 | 3 PACKAGE="webalizer" |
Hans-G?nter@22122 | 4 VERSION="2.23.08" |
pascal@1676 | 5 CATEGORY="network" |
Hans-G?nter@22122 | 6 TAGS="logs" |
pascal@1676 | 7 SHORT_DESC="Web server log file analysis program." |
pascal@1676 | 8 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15002 | 9 LICENSE="GPL2" |
pascal@23890 | 10 WEB_SITE="https://www.patrickfrei.ch/webalizer/" |
Hans-G?nter@22122 | 11 |
Hans-G?nter@22122 | 12 TARBALL="$PACKAGE-${VERSION%.*}-${VERSION##*.}-src.tar.bz2" |
pascal@1676 | 13 WGET_URL="ftp://ftp.mrunix.net/pub/$PACKAGE/$TARBALL" |
erjo@9923 | 14 |
Hans-G?nter@22122 | 15 DEPENDS="apache db libgd zlib" |
Hans-G?nter@22122 | 16 BUILD_DEPENDS="db-dev libgd-dev zlib-dev" |
erjo@9923 | 17 |
pascal@24465 | 18 # What is the latest version available today? |
pascal@24465 | 19 current_version() |
pascal@24465 | 20 { |
pascal@24465 | 21 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24465 | 22 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-||;s|-src.*||;s|-|.|;q" |
pascal@24465 | 23 } |
pascal@1676 | 24 |
pascal@1676 | 25 # Rules to configure and make the package. |
pascal@1676 | 26 compile_rules() |
pascal@1676 | 27 { |
pascal@18737 | 28 export LDFLAGS="$LDFLAGS -lpthread" |
pascal@5712 | 29 sed -i 's/define _LARGEFILE64_SOURCE = 1/define _LARGEFILE64_SOURCE/' \ |
pascal@5712 | 30 webalizer.c |
Hans-G?nter@22122 | 31 |
Hans-G?nter@22122 | 32 ./configure \ |
erjo@9923 | 33 --sysconfdir=/etc && |
pascal@1676 | 34 make && |
erjo@9923 | 35 make DESTDIR=$DESTDIR install |
pascal@1676 | 36 } |
pascal@1676 | 37 |
pascal@1676 | 38 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1676 | 39 genpkg_rules() |
pascal@1676 | 40 { |
Hans-G?nter@22122 | 41 mkdir -p $fs/usr |
Hans-G?nter@22122 | 42 mkdir -p $fs/etc |
Hans-G?nter@22122 | 43 mkdir -p $fs/var/www/webalizer |
pascal@1843 | 44 chown 80 $fs/var/www/webalizer |
Hans-G?nter@22122 | 45 mkdir -p $fs/etc/initcron.d |
Hans-G?nter@22122 | 46 |
Hans-G?nter@22122 | 47 cp -a $install/etc/webalizer.conf.sample $fs/etc/webalizer.conf |
Hans-G?nter@22122 | 48 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@22122 | 49 |
pascal@1978 | 50 cat > $fs/etc/initcron.d/webalizer << EOT |
pascal@1978 | 51 |
pascal@1978 | 52 30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log |
pascal@1978 | 53 EOT |
Hans-G?nter@22122 | 54 |
pascal@1978 | 55 chmod +x $fs/etc/initcron.d/webalizer |
pascal@1676 | 56 } |
pascal@1676 | 57 |
pascal@1843 | 58 # Pre and post install commands for Tazpkg. |
pascal@22810 | 59 pre_remove() |
pascal@22810 | 60 { |
pascal@22810 | 61 sed -i '/webalizer/d' "$1/etc/init.d/local.sh" |
pascal@22810 | 62 if [ -z "$1" ] |
pascal@22810 | 63 then |
pascal@22810 | 64 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT |
pascal@22810 | 65 $(crontab -l 2> /dev/null | grep -v webalizer) |
pascal@22810 | 66 EOT |
pascal@22810 | 67 fi |
pascal@22810 | 68 } |
pascal@22810 | 69 |
pascal@1843 | 70 post_install() |
pascal@1843 | 71 { |
pascal@18730 | 72 grep -q webalizer "$1/etc/init.d/local.sh" || \ |
pascal@18730 | 73 cat >> "$1/etc/init.d/local.sh" <<EOT |
pascal@1979 | 74 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log |
pascal@1978 | 75 EOT |
Hans-G?nter@22122 | 76 |
Hans-G?nter@22122 | 77 if [ -z "$1" ] |
Hans-G?nter@22122 | 78 then |
pascal@1843 | 79 webalizer -o /var/www/webalizer /var/log/apache/access_log |
pascal@1843 | 80 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT |
pascal@1843 | 81 $(crontab -l 2> /dev/null) |
pascal@1978 | 82 $(cat /etc/initcron.d/webalizer) |
pascal@1843 | 83 EOT |
pascal@22810 | 84 chmod -x /etc/initcron.d/webalizer |
pascal@1843 | 85 fi |
pascal@1843 | 86 } |