wok view webalizer/receipt @ rev 22343

ilmbase, open-iscsi: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 17 15:00:59 2019 +0100 (2019-11-17)
parents ce4a63ee0b85
children b1bc9dfa69a2
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 post_install()
54 {
55 grep -q webalizer "$1/etc/init.d/local.sh" || \
56 cat >> "$1/etc/init.d/local.sh" <<EOT
57 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
58 EOT
60 if [ -z "$1" ]
61 then
62 webalizer -o /var/www/webalizer /var/log/apache/access_log
63 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT
64 $(crontab -l 2> /dev/null)
65 $(cat /etc/initcron.d/webalizer)
66 EOT
67 fi
68 }