wok-next diff webalizer/receipt @ rev 21010

Small updates
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Oct 12 16:40:30 2018 +0300 (2018-10-12)
parents df238cf8b764
children d5aab818505e
line diff
     1.1 --- a/webalizer/receipt	Tue Nov 07 21:32:21 2017 +0100
     1.2 +++ b/webalizer/receipt	Fri Oct 12 16:40:30 2018 +0300
     1.3 @@ -1,54 +1,44 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="webalizer"
     1.8  VERSION="2.23-08"
     1.9  CATEGORY="network"
    1.10 -SHORT_DESC="Web server log file analysis program."
    1.11 +SHORT_DESC="Web server log file analysis program"
    1.12  MAINTAINER="pascal.bellard@slitaz.org"
    1.13  LICENSE="GPL2"
    1.14 +WEB_SITE="http://www.webalizer.com/"
    1.15 +
    1.16  TARBALL="$PACKAGE-$VERSION-src.tar.bz2"
    1.17 -WEB_SITE="http://www.webalizer.com/"
    1.18  WGET_URL="ftp://ftp.mrunix.net/pub/$PACKAGE/$TARBALL"
    1.19 -TAGS="logs"
    1.20  
    1.21 -DEPENDS="libgd zlib db apache"
    1.22  BUILD_DEPENDS="libgd libgd-dev zlib-dev db db-dev libjpeg-turbo"
    1.23  
    1.24 +compile_rules() {
    1.25 +	./configure &&
    1.26 +	make &&
    1.27 +	make DESTDIR=$DESTDIR install || return 1
    1.28  
    1.29 -# Rules to configure and make the package.
    1.30 -compile_rules()
    1.31 -{
    1.32 -	./configure  \
    1.33 -		--sysconfdir=/etc &&
    1.34 -	make &&
    1.35 -	make DESTDIR=$DESTDIR install
    1.36 +	mv $install/etc/webalizer.conf.sample $install/etc/webalizer.conf
    1.37 +	install -Dm755 $stuff/webalizer $install/etc/initcron.d/webalizer
    1.38 +	install -Dd -o80 -g80 $install/var/www/webalizer/
    1.39  }
    1.40  
    1.41 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.42 -genpkg_rules()
    1.43 -{
    1.44 -	mkdir -p $fs/usr $fs/etc $fs/var/www/webalizer $fs/etc/initcron.d
    1.45 -	chown 80 $fs/var/www/webalizer
    1.46 -	cp -a $install/etc/webalizer.conf.sample $fs/etc/webalizer.conf
    1.47 -	cp -a $install/usr/bin $fs/usr
    1.48 -	cat > $fs/etc/initcron.d/webalizer << EOT
    1.49 -
    1.50 -30 0 * * * /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
    1.51 -EOT
    1.52 -	chmod +x $fs/etc/initcron.d/webalizer
    1.53 +genpkg_rules() {
    1.54 +	copy @std
    1.55 +	DEPENDS="libgd zlib db apache"
    1.56 +	TAGS="logs"
    1.57  }
    1.58  
    1.59 -# Pre and post install commands for Tazpkg.
    1.60 -post_install()
    1.61 -{
    1.62 +post_install() {
    1.63  	grep -q webalizer "$1/etc/init.d/local.sh" || \
    1.64  	cat >> "$1/etc/init.d/local.sh" <<EOT
    1.65  [ -f /var/www/webalizer/index.html ] || /usr/bin/webalizer -o /var/www/webalizer /var/log/apache/access_log
    1.66  EOT
    1.67 +
    1.68  	if [ -z "$1" ]; then
    1.69 -		webalizer -o /var/www/webalizer /var/log/apache/access_log 
    1.70 -		crontab -l 2> /dev/null | grep -q webalizer || crontab - << EOT
    1.71 -$(crontab -l 2> /dev/null)
    1.72 +		webalizer -o /var/www/webalizer /var/log/apache/access_log
    1.73 +		crontab -l 2>/dev/null | grep -q webalizer || crontab - << EOT
    1.74 +$(crontab -l 2>/dev/null)
    1.75  $(cat /etc/initcron.d/webalizer)
    1.76  EOT
    1.77  	fi