wok-6.x annotate webalizer/receipt @ rev 13556

gtkdialog: up 0.8.2
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Nov 03 04:36:44 2012 +0000 (2012-11-03)
parents 386214f606f5
children 7896f0694ef6
rev   line source
pascal@1676 1 # SliTaz package receipt.
pascal@1676 2
pascal@1676 3 PACKAGE="webalizer"
erjo@2985 4 VERSION="2.21-02"
pascal@1676 5 CATEGORY="network"
pascal@1676 6 SHORT_DESC="Web server log file analysis program."
pascal@1676 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@1676 8 TARBALL="$PACKAGE-$VERSION-src.tar.bz2"
pascal@1676 9 WEB_SITE="http://www.webalizer.com/"
pascal@1676 10 WGET_URL="ftp://ftp.mrunix.net/pub/$PACKAGE/$TARBALL"
erjo@9923 11 TAGS="logs"
erjo@9923 12
pascal@1843 13 DEPENDS="libgd zlib db apache"
pascal@1676 14 BUILD_DEPENDS="libgd libgd-dev zlib-dev db db-dev"
erjo@9923 15
pascal@1676 16
pascal@1676 17 # Rules to configure and make the package.
pascal@1676 18 compile_rules()
pascal@1676 19 {
pascal@1676 20 cd $src
pascal@5712 21 sed -i 's/define _LARGEFILE64_SOURCE = 1/define _LARGEFILE64_SOURCE/' \
pascal@5712 22 webalizer.c
erjo@9923 23 ./configure \
erjo@9923 24 --sysconfdir=/etc &&
pascal@1676 25 make &&
erjo@9923 26 make DESTDIR=$DESTDIR install
pascal@1676 27 }
pascal@1676 28
pascal@1676 29 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1676 30 genpkg_rules()
pascal@1676 31 {
pascal@1978 32 mkdir -p $fs/usr $fs/etc $fs/var/www/webalizer $fs/etc/initcron.d
pascal@1843 33 chown 80 $fs/var/www/webalizer
pascal@1676 34 cp -a $_pkg/etc/webalizer.conf.sample $fs/etc/webalizer.conf
pascal@1676 35 cp -a $_pkg/usr/bin $fs/usr
pascal@1978 36 cat > $fs/etc/initcron.d/webalizer << EOT
pascal@1978 37
pascal@1978 38 30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
pascal@1978 39 EOT
pascal@1978 40 chmod +x $fs/etc/initcron.d/webalizer
pascal@1676 41 }
pascal@1676 42
pascal@1843 43 # Pre and post install commands for Tazpkg.
pascal@1843 44 post_install()
pascal@1843 45 {
pascal@1978 46 grep -q webalizer $1/etc/init.d/local.sh || \
pascal@1978 47 cat >> $1/etc/init.d/local.sh <<EOT
pascal@1979 48 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
pascal@1978 49 EOT
pascal@1843 50 if [ -z "$1" ]; then
pascal@1843 51 webalizer -o /var/www/webalizer /var/log/apache/access_log
pascal@1843 52 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT
pascal@1843 53 $(crontab -l 2> /dev/null)
pascal@1978 54 $(cat /etc/initcron.d/webalizer)
pascal@1843 55 EOT
pascal@1843 56 fi
pascal@1843 57 }