wok-next rev 21456

updated squid (3.5.27 -> 4.11)
author Hans-G?nter Theisgen
date Thu May 07 14:16:06 2020 +0100 (2020-05-07)
parents 72ff72059366
children 829568d90a2a
files squid/receipt
line diff
     1.1 --- a/squid/receipt	Thu May 07 14:00:17 2020 +0100
     1.2 +++ b/squid/receipt	Thu May 07 14:16:06 2020 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt v2.
     1.5  
     1.6  PACKAGE="squid"
     1.7 -VERSION="3.5.27"
     1.8 +VERSION="4.11"
     1.9  CATEGORY="network"
    1.10  SHORT_DESC="Web/FTP proxy"
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
    1.12 @@ -9,73 +9,78 @@
    1.13  WEB_SITE="http://www.squid-cache.org/"
    1.14  
    1.15  TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.16 -WGET_URL="${WEB_SITE}Versions/v3/${VERSION%.*}/$TARBALL"
    1.17 +WGET_URL="${WEB_SITE}Versions/v${VERSION%.*}/$TARBALL"
    1.18  
    1.19 -BUILD_DEPENDS="perl openssl-dev openldap-dev cyrus-sasl-dev libcap-dev"
    1.20 +BUILD_DEPENDS="cyrus-sasl-dev libcap-dev openldap-dev openssl-dev perl"
    1.21  SPLIT="$PACKAGE-auth-helpers $PACKAGE-langpack"
    1.22  
    1.23 -compile_rules() {
    1.24 +compile_rules()
    1.25 +{
    1.26  	touch scripts/boilerplate.h
    1.27  
    1.28 -	./configure \
    1.29 -		--sysconfdir=/etc/squid \
    1.30 -		--datadir=/usr/share/squid \
    1.31 -		--libexecdir=/usr/lib/squid \
    1.32 -		--with-logdir=/var/log/squid \
    1.33 -		--with-openssl \
    1.34 -		--disable-poll \
    1.35 -		--disable-snmp \
    1.36 -		--disable-icmp \
    1.37 -		--enable-http-violations \
    1.38 -		--disable-ident-lookups \
    1.39 -		--enable-storeio="aufs,diskd,ufs" \
    1.40 -		--enable-ssl \
    1.41 -		--enable-ssl-crtd \
    1.42 -		--enable-underscores \
    1.43 -		--enable-ntlm-fail-open \
    1.44 -		--enable-removal-policies="heap,lru" \
    1.45 -		--enable-delay-pools \
    1.46 -		--enable-linux-netfilter \
    1.47 -		--enable-basic-auth-helpers="NCSA,SMB,MSNT,LDAP" \
    1.48 -		--enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \
    1.49 -		--enable-useragent-log \
    1.50 -		--enable-referer-log \
    1.51 -		--enable-icap-client \
    1.52 -		--with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes" \
    1.53 +	./configure														\
    1.54 +		--sysconfdir=/etc/squid										\
    1.55 +		--datadir=/usr/share/squid									\
    1.56 +		--libexecdir=/usr/lib/squid									\
    1.57 +		 --enable-basic-auth-helpers="NCSA,SMB,MSNT,LDAP"			\
    1.58 +		 --enable-delay-pools										\
    1.59 +		 --enable-http-violations									\
    1.60 +		 --enable-icap-client										\
    1.61 +		--disable-icmp												\
    1.62 +		--disable-ident-lookups										\
    1.63 +		 --enable-linux-netfilter									\
    1.64 +		 --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth"		\
    1.65 +		 --enable-ntlm-fail-open									\
    1.66 +		--disable-poll												\
    1.67 +		 --enable-referer-log										\
    1.68 +		 --enable-removal-policies="heap,lru"						\
    1.69 +		--disable-snmp												\
    1.70 +		 --enable-ssl												\
    1.71 +		 --enable-ssl-crtd											\
    1.72 +		 --enable-storeio="aufs,diskd,ufs"							\
    1.73 +		 --enable-underscores										\
    1.74 +		 --enable-useragent-log										\
    1.75 +		--with-logdir=/var/log/squid								\
    1.76 +		--with-openssl												\
    1.77 +		--with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes"	\
    1.78  		$CONFIGURE_ARGS &&
    1.79  	fix libtool &&
    1.80  	make $MAKEFLAGS &&
    1.81  	make install
    1.82  }
    1.83  
    1.84 -genpkg_rules() {
    1.85 +genpkg_rules()
    1.86 +{
    1.87  	case $PACKAGE in
    1.88  		squid)
    1.89  			CONFIG_FILES="/etc/squid"
    1.90 -			DEPENDS="libsasl libldap openssl libltdl"
    1.91 +			DEPENDS="libldap libltdl libsasl openssl"
    1.92  			SUGGESTED="iptables"
    1.93 -			mkdir -p $fs/usr/share/squid/errors $fs/var/cache/squid \
    1.94 -				$fs/var/log/squid $fs/usr/lib/squid $fs/etc/squid/conf.d
    1.95 +			mkdir -p $fs/usr/share/squid/errors
    1.96 +			mkdir -p $fs/var/cache/squid
    1.97 +			mkdir -p $fs/var/log/squid
    1.98 +			mkdir -p $fs/usr/lib/squid
    1.99 +			mkdir -p $fs/etc/squid/conf.d
   1.100  
   1.101  			touch $fs/var/log/squid/cache.log
   1.102  
   1.103 -			cp -a $install/etc $fs
   1.104 -			rm -rf $fs/etc/squid/*.default
   1.105 -			cp -a $stuff/etc $fs
   1.106 +			cp -a $install/etc				$fs
   1.107 +			rm -rf							$fs/etc/squid/*.default
   1.108 +			cp -a $stuff/etc				$fs
   1.109  
   1.110 -			cp -a $install/var $fs
   1.111 -			cp -a $install/usr/bin $fs/usr
   1.112 -			cp -a $install/usr/sbin $fs/usr
   1.113 -			cp -a $install/usr/lib/squid/* $fs/usr/lib/squid
   1.114 +			cp -a $install/var				$fs
   1.115 +			cp -a $install/usr/bin			$fs/usr
   1.116 +			cp -a $install/usr/sbin			$fs/usr
   1.117 +			cp -a $install/usr/lib/squid/*	$fs/usr/lib/squid
   1.118  
   1.119  			# Remove auth libs
   1.120  			rm -f $fs/usr/lib/squid/*_auth*
   1.121  
   1.122 -			cp -a $install/usr/share/squid/mib.txt $fs/usr/share/squid
   1.123 -			cp -a $install/usr/share/squid/icons $fs/usr/share/squid
   1.124 -			cp -a $install/usr/share/squid/errors/templates $fs/usr/share/squid/errors
   1.125 -			cp -a $install/usr/share/squid/errors/en* $fs/usr/share/squid/errors
   1.126 -			cp -a $install/usr/share/squid/errors/fr* $fs/usr/share/squid/errors
   1.127 +			cp -a $install/usr/share/squid/mib.txt			$fs/usr/share/squid
   1.128 +			cp -a $install/usr/share/squid/icons			$fs/usr/share/squid
   1.129 +			cp -a $install/usr/share/squid/errors/templates	$fs/usr/share/squid/errors
   1.130 +			cp -a $install/usr/share/squid/errors/en*		$fs/usr/share/squid/errors
   1.131 +			cp -a $install/usr/share/squid/errors/fr*		$fs/usr/share/squid/errors
   1.132  
   1.133  			sed \
   1.134  				-e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
   1.135 @@ -100,30 +105,32 @@
   1.136  			;;
   1.137  		squid-auth-helpers)
   1.138  			CAT="network|auth helpers"
   1.139 -			DEPENDS="squid libldap libsasl openssl libkrb5 libcomerr3"
   1.140 +			DEPENDS="libcomerr3 libldap libsasl libkrb5 openssl squid"
   1.141  			mkdir -p $fs/usr/lib/squid
   1.142 -			cp -a $install/usr/lib/squid/*_auth* $fs/usr/lib/squid
   1.143 +			cp -a $install/usr/lib/squid/*_auth*	$fs/usr/lib/squid
   1.144  			;;
   1.145  		squid-langpack)
   1.146  			CAT="network|language pack"
   1.147  			DEPENDS="squid"
   1.148  			mkdir -p $fs/usr/share
   1.149 -			cp -a $install/usr/share/squid/errors $fs/usr/share
   1.150 -			rm -rf $fs/usr/share/squid/errors/en*
   1.151 -			rm -rf $fs/usr/share/squid/errors/fr*
   1.152 +			cp -a $install/usr/share/squid/errors	$fs/usr/share
   1.153 +			rm -rf									$fs/usr/share/squid/errors/en*
   1.154 +			rm -rf									$fs/usr/share/squid/errors/fr*
   1.155  			;;
   1.156  	esac
   1.157  }
   1.158  
   1.159 -post_install_squid() {
   1.160 +post_install_squid()
   1.161 +{
   1.162  	local user=squid group=squid
   1.163  
   1.164 -	if ! grep -q $user "$1/etc/passwd"; then
   1.165 +	if ! grep -q $user "$1/etc/passwd"
   1.166 +	  then
   1.167  		chroot "$1/" addgroup -S $group
   1.168  		chroot "$1/" adduser -S -D -H -G $group $user
   1.169 -	fi
   1.170 +	  fi
   1.171  
   1.172 -	# Set perms for files and directories
   1.173 +	# Set permissions for files and directories
   1.174  	chroot "$1/" chown -R $user:$group /var/log/squid /var/cache/squid
   1.175  
   1.176  	[ -n "$quiet" ] || cat <<EOF
   1.177 @@ -137,7 +144,8 @@
   1.178  EOF
   1.179  }
   1.180  
   1.181 -post_remove_squid() {
   1.182 +post_remove_squid()
   1.183 +{
   1.184  	# Removing stalled files...
   1.185  	test -d /var/cache/squid && rm -rf /var/cache/squid
   1.186  	test -d /var/log/squid   && rm -rf /var/log/squid