wok view webalizer/receipt @ rev 15002

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