wok-4.x annotate webalizer/receipt @ rev 8903

libwebkit needs -j1 to install
author Antoine Bodin <gokhlayeh@slitaz.org>
date Mon Feb 28 00:16:22 2011 +0100 (2011-02-28)
parents 35ec83c60e58
children 8823ab97b618
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"
pascal@1843 11 DEPENDS="libgd zlib db apache"
pascal@1676 12 BUILD_DEPENDS="libgd libgd-dev zlib-dev db db-dev"
jozee@4976 13 TAGS="logs"
pascal@1676 14
pascal@1676 15 # Rules to configure and make the package.
pascal@1676 16 compile_rules()
pascal@1676 17 {
pascal@1676 18 cd $src
pascal@5712 19 sed -i 's/define _LARGEFILE64_SOURCE = 1/define _LARGEFILE64_SOURCE/' \
pascal@5712 20 webalizer.c
pascal@1676 21 ./configure --prefix=/usr --sysconfdir=/etc \
pascal@1676 22 --mandir=/usr/share/man $CONFIGURE_ARGS &&
pascal@1676 23 make &&
pascal@1676 24 make DESTDIR=$PWD/_pkg install
pascal@1676 25 }
pascal@1676 26
pascal@1676 27 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1676 28 genpkg_rules()
pascal@1676 29 {
pascal@1978 30 mkdir -p $fs/usr $fs/etc $fs/var/www/webalizer $fs/etc/initcron.d
pascal@1843 31 chown 80 $fs/var/www/webalizer
pascal@1676 32 cp -a $_pkg/etc/webalizer.conf.sample $fs/etc/webalizer.conf
pascal@1676 33 cp -a $_pkg/usr/bin $fs/usr
pascal@1978 34 cat > $fs/etc/initcron.d/webalizer << EOT
pascal@1978 35
pascal@1978 36 30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
pascal@1978 37 EOT
pascal@1978 38 chmod +x $fs/etc/initcron.d/webalizer
pascal@1676 39 }
pascal@1676 40
pascal@1843 41 # Pre and post install commands for Tazpkg.
pascal@1843 42 post_install()
pascal@1843 43 {
pascal@1978 44 grep -q webalizer $1/etc/init.d/local.sh || \
pascal@1978 45 cat >> $1/etc/init.d/local.sh <<EOT
pascal@1979 46 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
pascal@1978 47 EOT
pascal@1843 48 if [ -z "$1" ]; then
pascal@1843 49 webalizer -o /var/www/webalizer /var/log/apache/access_log
pascal@1843 50 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT
pascal@1843 51 $(crontab -l 2> /dev/null)
pascal@1978 52 $(cat /etc/initcron.d/webalizer)
pascal@1843 53 EOT
pascal@1843 54 fi
pascal@1843 55 }