wok-6.x annotate squidclamav/receipt @ rev 23674

Up lemon, libsqlite, libsqlite-tcl (3.31.1)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 26 09:06:07 2020 +0000 (2020-04-26)
parents 9e01bc6321ea
children 5317a720eaa1
rev   line source
pascal@9981 1 # SliTaz package receipt.
pascal@9981 2
pascal@9981 3 PACKAGE="squidclamav"
Hans-G?nter@23665 4 VERSION="6.16"
pascal@9981 5 CATEGORY="security"
pascal@9981 6 SHORT_DESC="Antivirus redirector for Squid proxy."
pascal@9981 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15022 8 LICENSE="GPL3"
Hans-G?nter@23665 9 WEB_SITE="http://squidclamav.darold.net/"
Hans-G?nter@23665 10
pascal@9981 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@9981 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
Hans-G?nter@23665 13
Hans-G?nter@23665 14 DEPENDS="c_icap clamav libcurl squid squidguard"
Hans-G?nter@23665 15 BUILD_DEPENDS="c_icap-dev curl-dev"
Hans-G?nter@23665 16
pascal@9981 17 CONFIG_FILES="/etc/squidclamav.conf"
pascal@9981 18
pascal@9981 19 # Rules to configure and make the package.
pascal@9981 20 compile_rules()
pascal@9981 21 {
pascal@11894 22 mkdir -p $DESTDIR/etc
Hans-G?nter@23665 23
Hans-G?nter@23665 24 ./configure \
Hans-G?nter@23665 25 --prefix=/usr \
Hans-G?nter@23665 26 --libdir=/usr/lib \
Hans-G?nter@23665 27 --libexecdir=/var/www/cgi-bin \
Hans-G?nter@23665 28 --sysconfdir=/etc \
erjo@11917 29 $CONFIGURE_ARGS &&
Hans-G?nter@23665 30 make &&
Hans-G?nter@23665 31 make install
pascal@9981 32 }
pascal@9981 33
pascal@9981 34 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@9981 35 genpkg_rules()
pascal@9981 36 {
Hans-G?nter@23665 37 mkdir -p $fs/usr
Hans-G?nter@23665 38 mkdir -p $fs/etc/squid/conf.d
Hans-G?nter@23665 39
Hans-G?nter@23665 40 cp -a $install/etc $fs
Hans-G?nter@23665 41 cp -a $install/usr/lib $fs/usr
Hans-G?nter@23665 42 cp -a $install/var $fs
Hans-G?nter@23665 43 cp -a $stuff/icap-clamav.conf $fs/etc/squid/conf.d
Hans-G?nter@23665 44
Hans-G?nter@23665 45 # Customise configuration file
Hans-G?nter@23665 46 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
erjo@11917 47 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
erjo@11917 48 $fs/etc/squidclamav.conf
erjo@12148 49
Hans-G?nter@23665 50 rm -f $fs/usr/lib/c_icap/*.la
pascal@9981 51 }
erjo@11917 52
erjo@11917 53 #Post install command
erjo@11917 54 post_install()
erjo@11917 55 {
pascal@18730 56 echo 'Service squidclamav squidclamav.so' >> "$1/etc/c-icap/c-icap.conf"
Hans-G?nter@23665 57 [ "$1" ] ||
Hans-G?nter@23665 58 if ( ps | grep -q squid )
Hans-G?nter@23665 59 then
erjo@11917 60 /etc/init.d/squid restart
erjo@11917 61 fi
erjo@11917 62 }
erjo@11917 63
erjo@11917 64 #Post remove command
erjo@11917 65 post_remove()
erjo@11917 66 {
pascal@18730 67 sed -i -e "s/.*squidclamav.*//" "$1/etc/c-icap/c-icap.conf"
Hans-G?nter@23665 68 [ "$1" ] ||
Hans-G?nter@23665 69 if ( ps | grep -q squid )
Hans-G?nter@23665 70 then
erjo@11917 71 /etc/init.d/squid restart
erjo@11917 72 fi
Hans-G?nter@23665 73 [ "$1" ] ||
Hans-G?nter@23665 74 if ( ps | grep -q c-icap )
Hans-G?nter@23665 75 then
erjo@12148 76 /etc/init.d/c-icapd restart
erjo@12148 77 fi
erjo@11917 78 }