wok view webalizer/receipt @ rev 12897
get-skype: add pre_remove cleanup (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon May 28 11:46:48 2012 +0200 (2012-05-28) |
parents | 386214f606f5 |
children | 7896f0694ef6 |
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 TAGS="logs"
13 DEPENDS="libgd zlib db apache"
14 BUILD_DEPENDS="libgd libgd-dev zlib-dev db db-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 sed -i 's/define _LARGEFILE64_SOURCE = 1/define _LARGEFILE64_SOURCE/' \
22 webalizer.c
23 ./configure \
24 --sysconfdir=/etc &&
25 make &&
26 make DESTDIR=$DESTDIR install
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs/usr $fs/etc $fs/var/www/webalizer $fs/etc/initcron.d
33 chown 80 $fs/var/www/webalizer
34 cp -a $_pkg/etc/webalizer.conf.sample $fs/etc/webalizer.conf
35 cp -a $_pkg/usr/bin $fs/usr
36 cat > $fs/etc/initcron.d/webalizer << EOT
38 30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
39 EOT
40 chmod +x $fs/etc/initcron.d/webalizer
41 }
43 # Pre and post install commands for Tazpkg.
44 post_install()
45 {
46 grep -q webalizer $1/etc/init.d/local.sh || \
47 cat >> $1/etc/init.d/local.sh <<EOT
48 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
49 EOT
50 if [ -z "$1" ]; then
51 webalizer -o /var/www/webalizer /var/log/apache/access_log
52 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT
53 $(crontab -l 2> /dev/null)
54 $(cat /etc/initcron.d/webalizer)
55 EOT
56 fi
57 }