wok-current annotate squidclamav/receipt @ rev 23873

bluez-alsa, squidclamav, weston: tiny fix
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 25 15:44:40 2020 +0000 (2020-06-25)
parents 84809abba7af
children 40ad3dac47cb
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 {
pascal@23873 37 mkdir -p $fs/usr/share
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
pascal@23873 42 cp -a $install/usr/share/c_icap $fs/usr/share
Hans-G?nter@23665 43 cp -a $install/var $fs
Hans-G?nter@23665 44 cp -a $stuff/icap-clamav.conf $fs/etc/squid/conf.d
Hans-G?nter@23665 45
Hans-G?nter@23665 46 # Customise configuration file
Hans-G?nter@23665 47 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
erjo@11917 48 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
pascal@23873 49 $fs/etc/c_icap/squidclamav.conf
erjo@12148 50
Hans-G?nter@23665 51 rm -f $fs/usr/lib/c_icap/*.la
pascal@9981 52 }
erjo@11917 53
erjo@11917 54 #Post install command
erjo@11917 55 post_install()
erjo@11917 56 {
pascal@18730 57 echo 'Service squidclamav squidclamav.so' >> "$1/etc/c-icap/c-icap.conf"
Hans-G?nter@23665 58 [ "$1" ] ||
Hans-G?nter@23665 59 if ( ps | grep -q squid )
Hans-G?nter@23665 60 then
erjo@11917 61 /etc/init.d/squid restart
erjo@11917 62 fi
erjo@11917 63 }
erjo@11917 64
erjo@11917 65 #Post remove command
erjo@11917 66 post_remove()
erjo@11917 67 {
pascal@18730 68 sed -i -e "s/.*squidclamav.*//" "$1/etc/c-icap/c-icap.conf"
Hans-G?nter@23665 69 [ "$1" ] ||
Hans-G?nter@23665 70 if ( ps | grep -q squid )
Hans-G?nter@23665 71 then
erjo@11917 72 /etc/init.d/squid restart
erjo@11917 73 fi
Hans-G?nter@23665 74 [ "$1" ] ||
Hans-G?nter@23665 75 if ( ps | grep -q c-icap )
Hans-G?nter@23665 76 then
erjo@12148 77 /etc/init.d/c-icapd restart
erjo@12148 78 fi
erjo@11917 79 }