wok-next annotate webalizer/receipt @ rev 19583
Up: cookutils, tazpkg, aufs, kmod, lguest, linux, linux64.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Jan 02 07:42:47 2017 +0200 (2017-01-02) |
parents | 9e01bc6321ea |
children | df238cf8b764 |
rev | line source |
---|---|
pascal@1676 | 1 # SliTaz package receipt. |
pascal@1676 | 2 |
pascal@1676 | 3 PACKAGE="webalizer" |
erjo@2985 | 4 VERSION="2.21-02" |
pascal@1676 | 5 CATEGORY="network" |
pascal@1676 | 6 SHORT_DESC="Web server log file analysis program." |
pascal@1676 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@15002 | 8 LICENSE="GPL2" |
pascal@1676 | 9 TARBALL="$PACKAGE-$VERSION-src.tar.bz2" |
pascal@1676 | 10 WEB_SITE="http://www.webalizer.com/" |
pascal@1676 | 11 WGET_URL="ftp://ftp.mrunix.net/pub/$PACKAGE/$TARBALL" |
erjo@9923 | 12 TAGS="logs" |
erjo@9923 | 13 |
pascal@1843 | 14 DEPENDS="libgd zlib db apache" |
pascal@1676 | 15 BUILD_DEPENDS="libgd libgd-dev zlib-dev db db-dev" |
erjo@9923 | 16 |
pascal@1676 | 17 |
pascal@1676 | 18 # Rules to configure and make the package. |
pascal@1676 | 19 compile_rules() |
pascal@1676 | 20 { |
pascal@18737 | 21 export LDFLAGS="$LDFLAGS -lpthread" |
pascal@5712 | 22 sed -i 's/define _LARGEFILE64_SOURCE = 1/define _LARGEFILE64_SOURCE/' \ |
pascal@5712 | 23 webalizer.c |
erjo@9923 | 24 ./configure \ |
erjo@9923 | 25 --sysconfdir=/etc && |
pascal@1676 | 26 make && |
erjo@9923 | 27 make DESTDIR=$DESTDIR install |
pascal@1676 | 28 } |
pascal@1676 | 29 |
pascal@1676 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1676 | 31 genpkg_rules() |
pascal@1676 | 32 { |
pascal@1978 | 33 mkdir -p $fs/usr $fs/etc $fs/var/www/webalizer $fs/etc/initcron.d |
pascal@1843 | 34 chown 80 $fs/var/www/webalizer |
pascal@15002 | 35 cp -a $install/etc/webalizer.conf.sample $fs/etc/webalizer.conf |
pascal@15002 | 36 cp -a $install/usr/bin $fs/usr |
pascal@1978 | 37 cat > $fs/etc/initcron.d/webalizer << EOT |
pascal@1978 | 38 |
pascal@1978 | 39 30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log |
pascal@1978 | 40 EOT |
pascal@1978 | 41 chmod +x $fs/etc/initcron.d/webalizer |
pascal@1676 | 42 } |
pascal@1676 | 43 |
pascal@1843 | 44 # Pre and post install commands for Tazpkg. |
pascal@1843 | 45 post_install() |
pascal@1843 | 46 { |
pascal@18730 | 47 grep -q webalizer "$1/etc/init.d/local.sh" || \ |
pascal@18730 | 48 cat >> "$1/etc/init.d/local.sh" <<EOT |
pascal@1979 | 49 [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log |
pascal@1978 | 50 EOT |
pascal@1843 | 51 if [ -z "$1" ]; then |
pascal@1843 | 52 webalizer -o /var/www/webalizer /var/log/apache/access_log |
pascal@1843 | 53 crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT |
pascal@1843 | 54 $(crontab -l 2> /dev/null) |
pascal@1978 | 55 $(cat /etc/initcron.d/webalizer) |
pascal@1843 | 56 EOT |
pascal@1843 | 57 fi |
pascal@1843 | 58 } |