wok-next view webalizer/receipt @ rev 5393
Up: irssi (0.8.15)
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun May 02 02:43:33 2010 +0000 (2010-05-02) |
parents | 2e6c38769fae |
children | 386214f606f5 |
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 ./configure --prefix=/usr --sysconfdir=/etc \
20 --mandir=/usr/share/man $CONFIGURE_ARGS &&
21 make &&
22 make DESTDIR=$PWD/_pkg install
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 mkdir -p $fs/usr $fs/etc $fs/var/www/webalizer $fs/etc/initcron.d
29 chown 80 $fs/var/www/webalizer
30 cp -a $_pkg/etc/webalizer.conf.sample $fs/etc/webalizer.conf
31 cp -a $_pkg/usr/bin $fs/usr
32 cat > $fs/etc/initcron.d/webalizer << EOT
34 30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
35 EOT
36 chmod +x $fs/etc/initcron.d/webalizer
37 }
39 # Pre and post install commands for Tazpkg.
40 post_install()
41 {
42 grep -q webalizer $1/etc/init.d/local.sh || \
43 cat >> $1/etc/init.d/local.sh <<EOT
44 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
45 EOT
46 if [ -z "$1" ]; then
47 webalizer -o /var/www/webalizer /var/log/apache/access_log
48 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT
49 $(crontab -l 2> /dev/null)
50 $(cat /etc/initcron.d/webalizer)
51 EOT
52 fi
53 }