wok rev 25326

updated squidguardmgr (1.12 -> 1.14)
author Hans-G?nter Theisgen
date Fri Jul 22 17:47:15 2022 +0100 (21 months ago)
parents 5c2340dee00e
children 1065db0a8079
files squidguardmgr/description.txt squidguardmgr/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/squidguardmgr/description.txt	Fri Jul 22 17:47:15 2022 +0100
     1.3 @@ -0,0 +1,6 @@
     1.4 +SquidGuard Manager is a Perl CGI script used to manage
     1.5 +SquidGuard blocklists and ACLs.
     1.6 +It also has a GUI for SquidClamav.
     1.7 +It supports all configuration directives of SquidGuard
     1.8 +and SquidClamav, configuration files can still be edited
     1.9 +by hand.
     2.1 --- a/squidguardmgr/receipt	Fri Jul 22 17:33:47 2022 +0100
     2.2 +++ b/squidguardmgr/receipt	Fri Jul 22 17:47:15 2022 +0100
     2.3 @@ -1,16 +1,19 @@
     2.4  # SliTaz package receipt.
     2.5  
     2.6  PACKAGE="squidguardmgr"
     2.7 -VERSION="1.12"
     2.8 +VERSION="1.14"
     2.9  CATEGORY="system-tools"
    2.10  SHORT_DESC="Web GUI for squidGuard and SquidClamav administration."
    2.11  MAINTAINER="pascal.bellard@slitaz.org"
    2.12  LICENSE="GPL3"
    2.13 +WEB_SITE="https://sourceforge.net/projects/squidguardmgr/"
    2.14 +
    2.15  TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.16 -WEB_SITE="http://squidguardmgr.sourceforge.net/"
    2.17  WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    2.18 +
    2.19  DEPENDS="squidguard squidclamav lighttpd"
    2.20  BUILD_DEPENDS="perl squidguard "
    2.21 +
    2.22  CONFIG_FILES="/etc/squidguardmgr.conf"
    2.23  
    2.24  current_version()
    2.25 @@ -22,7 +25,6 @@
    2.26  # Rules to configure and make the package.
    2.27  compile_rules()
    2.28  {
    2.29 -	cd $src
    2.30  	SQUIDUSR=squid SQUIDGRP=squid perl Makefile.PL << EOT &&
    2.31  /etc/squidGuard/squidGuard.conf
    2.32  nobody
    2.33 @@ -34,40 +36,54 @@
    2.34  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.35  genpkg_rules()
    2.36  {
    2.37 -	mkdir -p $fs/usr/share $fs/etc $fs/var/lib/squidGuard/log $fs/var/lib/squidGuard/db 
    2.38 -	
    2.39 -	cp -a $install/var/www/squidguardmgr $fs/usr/share
    2.40 -	( cd $fs ; patch -p0 ) < $stuff/squidguardmgr.U
    2.41 -	mv $fs/usr/share/squidguardmgr/squidguardmgr.conf $fs/etc 
    2.42 +	mkdir -p $fs/usr/share
    2.43 +	mkdir -p $fs/etc
    2.44 +	mkdir -p $fs/var/lib/squidGuard/log
    2.45 +	mkdir -p $fs/var/lib/squidGuard/db 
    2.46 +
    2.47 +	cp -a $install/var/www/squidguardmgr	$fs/usr/share
    2.48 +	# 1.14 unsuitable
    2.49 +#	( cd $fs ; patch -p0 ) < $stuff/squidguardmgr.U
    2.50 +	mv $fs/usr/share/squidguardmgr/squidguardmgr.conf	$fs/etc 
    2.51  	ln -s /etc/squidguardmgr.conf $fs/usr/share/squidguardmgr/squidguardmgr.conf
    2.52 -	
    2.53 -	sed -i -e 's|/var/www/squidguardmgr|/usr/share/squidguardmgr|' \
    2.54 +
    2.55 +	sed -i	-e 's|/var/www/squidguardmgr|/usr/share/squidguardmgr|' \
    2.56  		-e 's|SQUIDCLAMAV	off|SQUIDCLAMAV	on|' \
    2.57  		-e 's|SC_CONF_FILE|SC_CONF_FILE	/etc/squidclamav.conf|' \
    2.58 -		-e 's|C_ICAP_SOCKET|C_ICAP_SOCKET	/var/run/c-icap/c-icap.ctl|' $fs/etc/squidguardmgr.conf
    2.59 +		-e 's|C_ICAP_SOCKET|C_ICAP_SOCKET	/var/run/c-icap/c-icap.ctl|' \
    2.60 +		$fs/etc/squidguardmgr.conf
    2.61  }
    2.62  
    2.63  post_install()
    2.64  {
    2.65 -	# squidguardmgr config
    2.66 -	chown root.www "$1/etc/squidGuard/squidGuard.conf"
    2.67 -	chmod 664 "$1/etc/squidGuard/squidGuard.conf"
    2.68 -	chown nobody.nogroup "$1"/usr/share/squidguardmgr/lang/* \
    2.69 -		"$1/usr/share/squidguardmgr/lang" "$1/usr/share/squidguardmgr"
    2.70 +	# squidguardmgr configuration
    2.71 +	chown root.www		"$1/etc/squidGuard/squidGuard.conf"
    2.72 +	chmod 664		"$1/etc/squidGuard/squidGuard.conf"
    2.73 +	chown nobody.nogroup	"$1"/usr/share/squidguardmgr/lang/*
    2.74 +	chown nobody.nogroup	"$1/usr/share/squidguardmgr/lang"
    2.75 +	chown nobody.nogroup	"$1/usr/share/squidguardmgr"
    2.76 +
    2.77  	# Configure lighttpd server
    2.78 -	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
    2.79 -		if ! grep -q /usr/share/squidguardmgr/ "$1/etc/lighttpd/lighttpd.conf"; then
    2.80 -	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/squidguardmgr/" => "/usr/share/squidguardmgr/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    2.81 -			if [ -z "$1" ]; then
    2.82 +	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
    2.83 +	  then
    2.84 +		if ! grep -q /usr/share/squidguardmgr/ "$1/etc/lighttpd/lighttpd.conf"
    2.85 +		  then
    2.86 +	    		sed -i -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/squidguardmgr/" => "/usr/share/squidguardmgr/",|g' \
    2.87 +				"$1/etc/lighttpd/lighttpd.conf"
    2.88 +			if [ -z "$1" ]
    2.89 +			  then
    2.90  				# Start Web server.
    2.91  				/etc/init.d/lighttpd stop
    2.92  				/etc/init.d/lighttpd start
    2.93  			fi
    2.94  		fi
    2.95  	fi
    2.96 +
    2.97  	# Configure apache server
    2.98 -	if [ -f "$1/etc/apache/httpd.conf" ]; then
    2.99 -		if [ ! -f "$1/etc/apache/conf.d/squidguardmgr" ]; then
   2.100 +	if [ -f "$1/etc/apache/httpd.conf" ]
   2.101 +	  then
   2.102 +		if [ ! -f "$1/etc/apache/conf.d/squidguardmgr" ]
   2.103 +		  then
   2.104  			cat > "$1/etc/apache/conf.d/squidguardmgr" <<EOT
   2.105  <IfModule mod_alias.c>
   2.106      Alias /squidguardmgr /usr/share/squidguardmgr
   2.107 @@ -80,7 +96,8 @@
   2.108      Allow from all
   2.109  </DirectoryMatch>
   2.110  EOT
   2.111 -			if [ -z "$1" ]; then
   2.112 +			if [ -z "$1" ]
   2.113 +			  then
   2.114  				# Start Web server.
   2.115  				/etc/init.d/apache stop
   2.116  				/etc/init.d/apache start