wok annotate squidclamav/receipt @ rev 24521
updated ettercap (0.8.3 -> 0.8.3.1)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Feb 22 15:47:04 2022 +0100 (2022-02-22) |
parents | 40ad3dac47cb |
children | 28a7087bc745 |
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@24094 | 19 current_version() |
pascal@24094 | 20 { |
pascal@24094 | 21 wget -O - https://github.com/darold/squidclamav/releases 2>/dev/null | \ |
pascal@24094 | 22 sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q' |
pascal@24094 | 23 } |
pascal@24094 | 24 |
pascal@9981 | 25 # Rules to configure and make the package. |
pascal@9981 | 26 compile_rules() |
pascal@9981 | 27 { |
pascal@11894 | 28 mkdir -p $DESTDIR/etc |
Hans-G?nter@23665 | 29 |
Hans-G?nter@23665 | 30 ./configure \ |
Hans-G?nter@23665 | 31 --prefix=/usr \ |
Hans-G?nter@23665 | 32 --libdir=/usr/lib \ |
Hans-G?nter@23665 | 33 --libexecdir=/var/www/cgi-bin \ |
Hans-G?nter@23665 | 34 --sysconfdir=/etc \ |
erjo@11917 | 35 $CONFIGURE_ARGS && |
Hans-G?nter@23665 | 36 make && |
Hans-G?nter@23665 | 37 make install |
pascal@9981 | 38 } |
pascal@9981 | 39 |
pascal@9981 | 40 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@9981 | 41 genpkg_rules() |
pascal@9981 | 42 { |
pascal@23873 | 43 mkdir -p $fs/usr/share |
Hans-G?nter@23665 | 44 mkdir -p $fs/etc/squid/conf.d |
Hans-G?nter@23665 | 45 |
Hans-G?nter@23665 | 46 cp -a $install/etc $fs |
Hans-G?nter@23665 | 47 cp -a $install/usr/lib $fs/usr |
pascal@23873 | 48 cp -a $install/usr/share/c_icap $fs/usr/share |
Hans-G?nter@23665 | 49 cp -a $install/var $fs |
Hans-G?nter@23665 | 50 cp -a $stuff/icap-clamav.conf $fs/etc/squid/conf.d |
Hans-G?nter@23665 | 51 |
Hans-G?nter@23665 | 52 # Customise configuration file |
Hans-G?nter@23665 | 53 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \ |
erjo@11917 | 54 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \ |
pascal@23874 | 55 $fs/etc/c-icap/squidclamav.conf |
erjo@12148 | 56 |
Hans-G?nter@23665 | 57 rm -f $fs/usr/lib/c_icap/*.la |
pascal@9981 | 58 } |
erjo@11917 | 59 |
erjo@11917 | 60 #Post install command |
erjo@11917 | 61 post_install() |
erjo@11917 | 62 { |
pascal@18730 | 63 echo 'Service squidclamav squidclamav.so' >> "$1/etc/c-icap/c-icap.conf" |
Hans-G?nter@23665 | 64 [ "$1" ] || |
Hans-G?nter@23665 | 65 if ( ps | grep -q squid ) |
Hans-G?nter@23665 | 66 then |
erjo@11917 | 67 /etc/init.d/squid restart |
erjo@11917 | 68 fi |
erjo@11917 | 69 } |
erjo@11917 | 70 |
erjo@11917 | 71 #Post remove command |
erjo@11917 | 72 post_remove() |
erjo@11917 | 73 { |
pascal@18730 | 74 sed -i -e "s/.*squidclamav.*//" "$1/etc/c-icap/c-icap.conf" |
Hans-G?nter@23665 | 75 [ "$1" ] || |
Hans-G?nter@23665 | 76 if ( ps | grep -q squid ) |
Hans-G?nter@23665 | 77 then |
erjo@11917 | 78 /etc/init.d/squid restart |
erjo@11917 | 79 fi |
Hans-G?nter@23665 | 80 [ "$1" ] || |
Hans-G?nter@23665 | 81 if ( ps | grep -q c-icap ) |
Hans-G?nter@23665 | 82 then |
erjo@12148 | 83 /etc/init.d/c-icapd restart |
erjo@12148 | 84 fi |
erjo@11917 | 85 } |