wok-6.x view webalizer/receipt @ rev 7411
merge
author | fireflyoo <lufeng369@gmail.com> |
---|---|
date | Sun Nov 28 17:16:25 2010 +0800 (2010-11-28) |
parents | 35ec83c60e58 |
children | 8823ab97b618 |
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 TARBALL="$PACKAGE-$VERSION-src.tar.bz2"
9 WEB_SITE="http://www.webalizer.com/"
10 WGET_URL="ftp://ftp.mrunix.net/pub/$PACKAGE/$TARBALL"
11 DEPENDS="libgd zlib db apache"
12 BUILD_DEPENDS="libgd libgd-dev zlib-dev db db-dev"
13 TAGS="logs"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 sed -i 's/define _LARGEFILE64_SOURCE = 1/define _LARGEFILE64_SOURCE/' \
20 webalizer.c
21 ./configure --prefix=/usr --sysconfdir=/etc \
22 --mandir=/usr/share/man $CONFIGURE_ARGS &&
23 make &&
24 make DESTDIR=$PWD/_pkg install
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 mkdir -p $fs/usr $fs/etc $fs/var/www/webalizer $fs/etc/initcron.d
31 chown 80 $fs/var/www/webalizer
32 cp -a $_pkg/etc/webalizer.conf.sample $fs/etc/webalizer.conf
33 cp -a $_pkg/usr/bin $fs/usr
34 cat > $fs/etc/initcron.d/webalizer << EOT
36 30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
37 EOT
38 chmod +x $fs/etc/initcron.d/webalizer
39 }
41 # Pre and post install commands for Tazpkg.
42 post_install()
43 {
44 grep -q webalizer $1/etc/init.d/local.sh || \
45 cat >> $1/etc/init.d/local.sh <<EOT
46 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
47 EOT
48 if [ -z "$1" ]; then
49 webalizer -o /var/www/webalizer /var/log/apache/access_log
50 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT
51 $(crontab -l 2> /dev/null)
52 $(cat /etc/initcron.d/webalizer)
53 EOT
54 fi
55 }