wok-6.x view webalizer/receipt @ rev 4179
xfce-utils, fix perms on shell scripts.
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Tue Sep 22 20:29:04 2009 +0000 (2009-09-22) |
parents | 27d5edd4588a |
children | 35ec83c60e58 |
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"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 ./configure --prefix=/usr --sysconfdir=/etc \
19 --mandir=/usr/share/man $CONFIGURE_ARGS &&
20 make &&
21 make DESTDIR=$PWD/_pkg install
22 }
24 # Rules to gen a SliTaz package suitable for Tazpkg.
25 genpkg_rules()
26 {
27 mkdir -p $fs/usr $fs/etc $fs/var/www/webalizer $fs/etc/initcron.d
28 chown 80 $fs/var/www/webalizer
29 cp -a $_pkg/etc/webalizer.conf.sample $fs/etc/webalizer.conf
30 cp -a $_pkg/usr/bin $fs/usr
31 cat > $fs/etc/initcron.d/webalizer << EOT
33 30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
34 EOT
35 chmod +x $fs/etc/initcron.d/webalizer
36 }
38 # Pre and post install commands for Tazpkg.
39 post_install()
40 {
41 grep -q webalizer $1/etc/init.d/local.sh || \
42 cat >> $1/etc/init.d/local.sh <<EOT
43 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
44 EOT
45 if [ -z "$1" ]; then
46 webalizer -o /var/www/webalizer /var/log/apache/access_log
47 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT
48 $(crontab -l 2> /dev/null)
49 $(cat /etc/initcron.d/webalizer)
50 EOT
51 fi
52 }