wok-next diff privoxy/receipt @ rev 20674

Up putty (0.70)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 12 05:17:48 2018 +0300 (2018-05-12)
parents 9e01bc6321ea
children 342b30daff76
line diff
     1.1 --- a/privoxy/receipt	Sun Dec 20 15:13:45 2015 +0100
     1.2 +++ b/privoxy/receipt	Sat May 12 05:17:48 2018 +0300
     1.3 @@ -1,80 +1,59 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="privoxy"
     1.8  VERSION="3.0.23-stable"
     1.9  CATEGORY="network"
    1.10 -SHORT_DESC="Non-caching web privacy proxy."
    1.11 +SHORT_DESC="Non-caching web privacy proxy"
    1.12  MAINTAINER="paul@slitaz.org"
    1.13  LICENSE="GPL2"
    1.14 +WEB_SITE="http://www.privoxy.org/"
    1.15 +
    1.16  TARBALL="$PACKAGE-$VERSION-src.tar.gz"
    1.17 -WEB_SITE="http://www.privoxy.org/"
    1.18  WGET_URL="http://downloads.sourceforge.net/ijbswa/$TARBALL"
    1.19  
    1.20 -DEPENDS="zlib pcre"
    1.21  BUILD_DEPENDS="zlib-dev autoconf perl m4 coreutils"
    1.22  
    1.23 -# Rules to configure and make the package.
    1.24 -compile_rules()
    1.25 -{
    1.26 +compile_rules() {
    1.27  	# Have to create privoxy user/group to be able to compile
    1.28  	adduser -s /bin/false -H -D -u 42 privoxy
    1.29  	addgroup -g 42 privoxy
    1.30 -	
    1.31 -	cd $src
    1.32  
    1.33 -	# Needs autoconf
    1.34  	autoheader
    1.35  	autoconf
    1.36  
    1.37  	./configure \
    1.38 -		--prefix=/usr \
    1.39  		--sysconfdir=/etc/privoxy \
    1.40 -		--infodir=/usr/share/info \
    1.41 -		--mandir=/usr/share/man \
    1.42 -		--localstatedir=/var \
    1.43  		$CONFIGURE_ARGS &&
    1.44 -	make && make DESTDIR=$DESTDIR install
    1.45 +	make &&
    1.46 +	make DESTDIR=$DESTDIR install || return 1
    1.47 +
    1.48 +	install -Dm755 $stuff/daemon-privoxy $install/etc/init.d/privoxy
    1.49  }
    1.50  
    1.51 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.52 -genpkg_rules()
    1.53 -{
    1.54 -	mkdir -p $fs/etc/init.d $fs/usr
    1.55 -	cp -a $install/usr/sbin $fs/usr
    1.56 -	cp -a $install/var $fs
    1.57 -	cp -a $install/etc $fs
    1.58 -
    1.59 -	# Copy daemon from stuff
    1.60 -	cp $stuff/daemon-privoxy $fs/etc/init.d/privoxy
    1.61 +genpkg_rules() {
    1.62 +	copy @std
    1.63 +	DEPENDS="zlib pcre"
    1.64  }
    1.65  
    1.66 -post_install()
    1.67 -{
    1.68 +post_install() {
    1.69  	# adduser privoxy if needed
    1.70  	if ! grep -q privoxy "$1/etc/passwd"; then
    1.71 -		echo -n "Adding user privoxy..."
    1.72  		chroot "$1/" adduser -s /bin/false -H -D -u 42 privoxy
    1.73 -		status
    1.74  	fi
    1.75  
    1.76  	if ! grep -q privoxy "$1/etc/group"; then
    1.77 -		echo -n "Adding group privoxy..."
    1.78  		chroot "$1/" addgroup -g 42 privoxy
    1.79 -		status
    1.80  	fi
    1.81  
    1.82  	# and change file permissions
    1.83 -	echo -n "Changing file permissions..."
    1.84  	chroot "$1/" chown -R privoxy.privoxy /etc/privoxy
    1.85  	chown -R root.root "$1/etc/privoxy/templates"
    1.86  	chown root.root "$1/etc/privoxy"
    1.87  	chroot "$1/" chown privoxy.privoxy /var/log/privoxy/logfile
    1.88 -	status
    1.89  }
    1.90  
    1.91  # Del user privoxy when pkg is removed.
    1.92 -post_remove()
    1.93 -{
    1.94 +post_remove() {
    1.95  	deluser privoxy
    1.96  	delgroup privoxy
    1.97  }