wok-6.x rev 11917
Up: squidclamav (6.5) & improve package
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Thu Mar 01 00:01:55 2012 +0100 (2012-03-01) |
parents | be8fcea4e231 |
children | 0256f038018f |
files | squidclamav/receipt squidclamav/stuff/icap-clamav.conf |
line diff
1.1 --- a/squidclamav/receipt Thu Mar 01 00:01:17 2012 +0100 1.2 +++ b/squidclamav/receipt Thu Mar 01 00:01:55 2012 +0100 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="squidclamav" 1.7 -VERSION="5.7" 1.8 +VERSION="6.5" 1.9 CATEGORY="security" 1.10 SHORT_DESC="Antivirus redirector for Squid proxy." 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 @@ -10,8 +10,8 @@ 1.13 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 1.14 CONFIG_FILES="/etc/squidclamav.conf" 1.15 1.16 -DEPENDS="squid libcurl" 1.17 -BUILD_DEPENDS="curl-dev" 1.18 +DEPENDS="squid libcurl clamav c_icap squidguard" 1.19 +BUILD_DEPENDS="curl-dev c_icap-dev" 1.20 1.21 # Rules to configure and make the package. 1.22 compile_rules() 1.23 @@ -21,16 +21,41 @@ 1.24 ./configure \ 1.25 --prefix=/usr \ 1.26 --libexecdir=/usr/lib \ 1.27 - $CONFIGURE_ARGS && 1.28 - make && make DESTDIR=$DESTDIR install && 1.29 - cp etc/squidclamav.conf $DESTDIR/etc 1.30 + --sysconfdir=/etc \ 1.31 + $CONFIGURE_ARGS && 1.32 + make && make install 1.33 } 1.34 1.35 # Rules to gen a SliTaz package suitable for Tazpkg. 1.36 genpkg_rules() 1.37 { 1.38 - mkdir -p $fs/usr 1.39 - cp -a $_pkg/etc $fs 1.40 - cp -a $_pkg/usr/bin $fs/usr 1.41 - cp -a $_pkg/usr/lib $fs/usr 1.42 + mkdir -p $fs/usr \ 1.43 + $fs/var/www/cgi-bin \ 1.44 + $fs/etc/squid/conf.d 1.45 + 1.46 + cp -a $install/etc $fs 1.47 + cp -a $install/usr/lib $fs/usr 1.48 + cp -a $stuff/icap-clamav.conf $fs/etc/squid/conf.d 1.49 + 1.50 + # Customise config file 1.51 + sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/clwarn.cgi|" \ 1.52 + -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \ 1.53 + $fs/etc/squidclamav.conf 1.54 + 1.55 } 1.56 + 1.57 +#Post install command 1.58 +post_install() 1.59 +{ 1.60 + if ( ps | grep -q squid ); then 1.61 + /etc/init.d/squid restart 1.62 + fi 1.63 +} 1.64 + 1.65 +#Post remove command 1.66 +post_remove() 1.67 +{ 1.68 + if ( ps | grep -q squid ); then 1.69 + /etc/init.d/squid restart 1.70 + fi 1.71 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/squidclamav/stuff/icap-clamav.conf Thu Mar 01 00:01:55 2012 +0100 2.3 @@ -0,0 +1,13 @@ 2.4 +# Config include for squidclamav 2.5 +# Add include /etc/squid/icap.conf to you Squid config file (/etc/squid/squid.conf) 2.6 +icap_enable on 2.7 +icap_send_client_ip on 2.8 +icap_send_client_username on 2.9 +icap_client_username_encode off 2.10 +icap_client_username_header X-Authenticated-User 2.11 +icap_preview_enable on 2.12 +icap_preview_size 1024 2.13 +icap_service service_req reqmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav 2.14 +adaptation_access service_req allow all 2.15 +icap_service service_resp respmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav 2.16 +adaptation_access service_resp allow all