wok-6.x annotate webalizer/receipt @ rev 23713
updated udisks and udisks-dev (1.0.4 -> 1.0.5)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Apr 28 17:55:30 2020 +0100 (2020-04-28) |
parents | b37b128e01b2 |
children | 78bc4b109dd6 |
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" |
Hans-G?nter@22122 | 10 WEB_SITE="http://www.webalizer.org/" |
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@1676 | 18 |
pascal@1676 | 19 # Rules to configure and make the package. |
pascal@1676 | 20 compile_rules() |
pascal@1676 | 21 { |
pascal@18737 | 22 export LDFLAGS="$LDFLAGS -lpthread" |
pascal@5712 | 23 sed -i 's/define _LARGEFILE64_SOURCE = 1/define _LARGEFILE64_SOURCE/' \ |
pascal@5712 | 24 webalizer.c |
Hans-G?nter@22122 | 25 |
Hans-G?nter@22122 | 26 ./configure \ |
erjo@9923 | 27 --sysconfdir=/etc && |
pascal@1676 | 28 make && |
erjo@9923 | 29 make DESTDIR=$DESTDIR install |
pascal@1676 | 30 } |
pascal@1676 | 31 |
pascal@1676 | 32 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1676 | 33 genpkg_rules() |
pascal@1676 | 34 { |
Hans-G?nter@22122 | 35 mkdir -p $fs/usr |
Hans-G?nter@22122 | 36 mkdir -p $fs/etc |
Hans-G?nter@22122 | 37 mkdir -p $fs/var/www/webalizer |
pascal@1843 | 38 chown 80 $fs/var/www/webalizer |
Hans-G?nter@22122 | 39 mkdir -p $fs/etc/initcron.d |
Hans-G?nter@22122 | 40 |
Hans-G?nter@22122 | 41 cp -a $install/etc/webalizer.conf.sample $fs/etc/webalizer.conf |
Hans-G?nter@22122 | 42 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@22122 | 43 |
pascal@1978 | 44 cat > $fs/etc/initcron.d/webalizer << EOT |
pascal@1978 | 45 |
pascal@1978 | 46 30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log |
pascal@1978 | 47 EOT |
Hans-G?nter@22122 | 48 |
pascal@1978 | 49 chmod +x $fs/etc/initcron.d/webalizer |
pascal@1676 | 50 } |
pascal@1676 | 51 |
pascal@1843 | 52 # Pre and post install commands for Tazpkg. |
pascal@22810 | 53 pre_remove() |
pascal@22810 | 54 { |
pascal@22810 | 55 sed -i '/webalizer/d' "$1/etc/init.d/local.sh" |
pascal@22810 | 56 if [ -z "$1" ] |
pascal@22810 | 57 then |
pascal@22810 | 58 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT |
pascal@22810 | 59 $(crontab -l 2> /dev/null | grep -v webalizer) |
pascal@22810 | 60 EOT |
pascal@22810 | 61 fi |
pascal@22810 | 62 } |
pascal@22810 | 63 |
pascal@1843 | 64 post_install() |
pascal@1843 | 65 { |
pascal@18730 | 66 grep -q webalizer "$1/etc/init.d/local.sh" || \ |
pascal@18730 | 67 cat >> "$1/etc/init.d/local.sh" <<EOT |
pascal@1979 | 68 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log |
pascal@1978 | 69 EOT |
Hans-G?nter@22122 | 70 |
Hans-G?nter@22122 | 71 if [ -z "$1" ] |
Hans-G?nter@22122 | 72 then |
pascal@1843 | 73 webalizer -o /var/www/webalizer /var/log/apache/access_log |
pascal@1843 | 74 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT |
pascal@1843 | 75 $(crontab -l 2> /dev/null) |
pascal@1978 | 76 $(cat /etc/initcron.d/webalizer) |
pascal@1843 | 77 EOT |
pascal@22810 | 78 chmod -x /etc/initcron.d/webalizer |
pascal@1843 | 79 fi |
pascal@1843 | 80 } |