wok diff squidguardmgr/receipt @ rev 25354

updated tiff, tiff-apps and tiff-dev (4.1.0 -> 4.4.0)
author Hans-G?nter Theisgen
date Tue Jul 26 16:22:26 2022 +0100 (23 months ago)
parents 46dcc80bef41
children ad0bc3efbf37
line diff
     1.1 --- a/squidguardmgr/receipt	Mon Aug 09 16:49:29 2021 +0000
     1.2 +++ b/squidguardmgr/receipt	Tue Jul 26 16:22:26 2022 +0100
     1.3 @@ -1,16 +1,19 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="squidguardmgr"
     1.7 -VERSION="1.12"
     1.8 +VERSION="1.14"
     1.9  CATEGORY="system-tools"
    1.10  SHORT_DESC="Web GUI for squidGuard and SquidClamav administration."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
    1.12  LICENSE="GPL3"
    1.13 +WEB_SITE="https://sourceforge.net/projects/squidguardmgr/"
    1.14 +
    1.15  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.16 -WEB_SITE="http://squidguardmgr.sourceforge.net/"
    1.17  WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    1.18 +
    1.19  DEPENDS="squidguard squidclamav lighttpd"
    1.20  BUILD_DEPENDS="perl squidguard "
    1.21 +
    1.22  CONFIG_FILES="/etc/squidguardmgr.conf"
    1.23  
    1.24  current_version()
    1.25 @@ -22,7 +25,6 @@
    1.26  # Rules to configure and make the package.
    1.27  compile_rules()
    1.28  {
    1.29 -	cd $src
    1.30  	SQUIDUSR=squid SQUIDGRP=squid perl Makefile.PL << EOT &&
    1.31  /etc/squidGuard/squidGuard.conf
    1.32  nobody
    1.33 @@ -34,40 +36,54 @@
    1.34  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.35  genpkg_rules()
    1.36  {
    1.37 -	mkdir -p $fs/usr/share $fs/etc $fs/var/lib/squidGuard/log $fs/var/lib/squidGuard/db 
    1.38 -	
    1.39 -	cp -a $install/var/www/squidguardmgr $fs/usr/share
    1.40 -	( cd $fs ; patch -p0 ) < $stuff/squidguardmgr.U
    1.41 -	mv $fs/usr/share/squidguardmgr/squidguardmgr.conf $fs/etc 
    1.42 +	mkdir -p $fs/usr/share
    1.43 +	mkdir -p $fs/etc
    1.44 +	mkdir -p $fs/var/lib/squidGuard/log
    1.45 +	mkdir -p $fs/var/lib/squidGuard/db 
    1.46 +
    1.47 +	cp -a $install/var/www/squidguardmgr	$fs/usr/share
    1.48 +	# 1.14 unsuitable
    1.49 +#	( cd $fs ; patch -p0 ) < $stuff/squidguardmgr.U
    1.50 +	mv $fs/usr/share/squidguardmgr/squidguardmgr.conf	$fs/etc 
    1.51  	ln -s /etc/squidguardmgr.conf $fs/usr/share/squidguardmgr/squidguardmgr.conf
    1.52 -	
    1.53 -	sed -i -e 's|/var/www/squidguardmgr|/usr/share/squidguardmgr|' \
    1.54 +
    1.55 +	sed -i	-e 's|/var/www/squidguardmgr|/usr/share/squidguardmgr|' \
    1.56  		-e 's|SQUIDCLAMAV	off|SQUIDCLAMAV	on|' \
    1.57  		-e 's|SC_CONF_FILE|SC_CONF_FILE	/etc/squidclamav.conf|' \
    1.58 -		-e 's|C_ICAP_SOCKET|C_ICAP_SOCKET	/var/run/c-icap/c-icap.ctl|' $fs/etc/squidguardmgr.conf
    1.59 +		-e 's|C_ICAP_SOCKET|C_ICAP_SOCKET	/var/run/c-icap/c-icap.ctl|' \
    1.60 +		$fs/etc/squidguardmgr.conf
    1.61  }
    1.62  
    1.63  post_install()
    1.64  {
    1.65 -	# squidguardmgr config
    1.66 -	chown root.www "$1/etc/squidGuard/squidGuard.conf"
    1.67 -	chmod 664 "$1/etc/squidGuard/squidGuard.conf"
    1.68 -	chown nobody.nogroup "$1"/usr/share/squidguardmgr/lang/* \
    1.69 -		"$1/usr/share/squidguardmgr/lang" "$1/usr/share/squidguardmgr"
    1.70 +	# squidguardmgr configuration
    1.71 +	chown root.www		"$1/etc/squidGuard/squidGuard.conf"
    1.72 +	chmod 664		"$1/etc/squidGuard/squidGuard.conf"
    1.73 +	chown nobody.nogroup	"$1"/usr/share/squidguardmgr/lang/*
    1.74 +	chown nobody.nogroup	"$1/usr/share/squidguardmgr/lang"
    1.75 +	chown nobody.nogroup	"$1/usr/share/squidguardmgr"
    1.76 +
    1.77  	# Configure lighttpd server
    1.78 -	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
    1.79 -		if ! grep -q /usr/share/squidguardmgr/ "$1/etc/lighttpd/lighttpd.conf"; then
    1.80 -	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/squidguardmgr/" => "/usr/share/squidguardmgr/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.81 -			if [ -z "$1" ]; then
    1.82 +	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
    1.83 +	  then
    1.84 +		if ! grep -q /usr/share/squidguardmgr/ "$1/etc/lighttpd/lighttpd.conf"
    1.85 +		  then
    1.86 +	    		sed -i -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/squidguardmgr/" => "/usr/share/squidguardmgr/",|g' \
    1.87 +				"$1/etc/lighttpd/lighttpd.conf"
    1.88 +			if [ -z "$1" ]
    1.89 +			  then
    1.90  				# Start Web server.
    1.91  				/etc/init.d/lighttpd stop
    1.92  				/etc/init.d/lighttpd start
    1.93  			fi
    1.94  		fi
    1.95  	fi
    1.96 +
    1.97  	# Configure apache server
    1.98 -	if [ -f "$1/etc/apache/httpd.conf" ]; then
    1.99 -		if [ ! -f "$1/etc/apache/conf.d/squidguardmgr" ]; then
   1.100 +	if [ -f "$1/etc/apache/httpd.conf" ]
   1.101 +	  then
   1.102 +		if [ ! -f "$1/etc/apache/conf.d/squidguardmgr" ]
   1.103 +		  then
   1.104  			cat > "$1/etc/apache/conf.d/squidguardmgr" <<EOT
   1.105  <IfModule mod_alias.c>
   1.106      Alias /squidguardmgr /usr/share/squidguardmgr
   1.107 @@ -80,7 +96,8 @@
   1.108      Allow from all
   1.109  </DirectoryMatch>
   1.110  EOT
   1.111 -			if [ -z "$1" ]; then
   1.112 +			if [ -z "$1" ]
   1.113 +			  then
   1.114  				# Start Web server.
   1.115  				/etc/init.d/apache stop
   1.116  				/etc/init.d/apache start