wok-current view webalizer/receipt @ rev 23286
updated perl-algorithm-permute (0.12 -> 0.16)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Mar 29 14:45:23 2020 +0100 (2020-03-29) |
parents | b37b128e01b2 |
children | 78bc4b109dd6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="webalizer"
4 VERSION="2.23.08"
5 CATEGORY="network"
6 TAGS="logs"
7 SHORT_DESC="Web server log file analysis program."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="http://www.webalizer.org/"
12 TARBALL="$PACKAGE-${VERSION%.*}-${VERSION##*.}-src.tar.bz2"
13 WGET_URL="ftp://ftp.mrunix.net/pub/$PACKAGE/$TARBALL"
15 DEPENDS="apache db libgd zlib"
16 BUILD_DEPENDS="db-dev libgd-dev zlib-dev"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 export LDFLAGS="$LDFLAGS -lpthread"
23 sed -i 's/define _LARGEFILE64_SOURCE = 1/define _LARGEFILE64_SOURCE/' \
24 webalizer.c
26 ./configure \
27 --sysconfdir=/etc &&
28 make &&
29 make DESTDIR=$DESTDIR install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr
36 mkdir -p $fs/etc
37 mkdir -p $fs/var/www/webalizer
38 chown 80 $fs/var/www/webalizer
39 mkdir -p $fs/etc/initcron.d
41 cp -a $install/etc/webalizer.conf.sample $fs/etc/webalizer.conf
42 cp -a $install/usr/bin $fs/usr
44 cat > $fs/etc/initcron.d/webalizer << EOT
46 30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
47 EOT
49 chmod +x $fs/etc/initcron.d/webalizer
50 }
52 # Pre and post install commands for Tazpkg.
53 pre_remove()
54 {
55 sed -i '/webalizer/d' "$1/etc/init.d/local.sh"
56 if [ -z "$1" ]
57 then
58 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT
59 $(crontab -l 2> /dev/null | grep -v webalizer)
60 EOT
61 fi
62 }
64 post_install()
65 {
66 grep -q webalizer "$1/etc/init.d/local.sh" || \
67 cat >> "$1/etc/init.d/local.sh" <<EOT
68 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
69 EOT
71 if [ -z "$1" ]
72 then
73 webalizer -o /var/www/webalizer /var/log/apache/access_log
74 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT
75 $(crontab -l 2> /dev/null)
76 $(cat /etc/initcron.d/webalizer)
77 EOT
78 chmod -x /etc/initcron.d/webalizer
79 fi
80 }