wok-next annotate squidclamav/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents b84b01f3048e
children
rev   line source
al@20534 1 # SliTaz package receipt v2.
pascal@9981 2
pascal@9981 3 PACKAGE="squidclamav"
erjo@14813 4 VERSION="6.10"
pascal@9981 5 CATEGORY="security"
al@20534 6 SHORT_DESC="Antivirus redirector for Squid proxy"
pascal@9981 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15022 8 LICENSE="GPL3"
al@20534 9 WEB_SITE="http://squidclamav.darold.net/"
al@20534 10
pascal@9981 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@9981 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@9981 13
al@20985 14 BUILD_DEPENDS="curl-dev c-icap-dev"
pankso@10444 15
al@20534 16 compile_rules() {
al@21020 17 mkdir -p $install/etc
pankso@10444 18 ./configure \
erjo@11923 19 --libdir=/usr/lib \
erjo@11923 20 --libexecdir=/var/www/cgi-bin \
erjo@11917 21 $CONFIGURE_ARGS &&
al@20604 22 fix libtool &&
al@20534 23 make &&
al@20534 24 make install || return 1
al@20534 25
al@20534 26 install -Dm644 $stuff/icap-clamav.conf $install/etc/squid/conf.d/icap-clamav.conf
pascal@9981 27 }
pascal@9981 28
al@20534 29 genpkg_rules() {
al@20534 30 copy @std
erjo@11917 31 # Customise config file
erjo@11923 32 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
erjo@11917 33 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
erjo@11917 34 $fs/etc/squidclamav.conf
al@20985 35 DEPENDS="squid libcurl clamav c-icap squidguard"
al@20534 36 CONFIG_FILES="/etc/squidclamav.conf"
pascal@9981 37 }
erjo@11917 38
al@20534 39 post_install() {
pascal@18730 40 echo 'Service squidclamav squidclamav.so' >> "$1/etc/c-icap/c-icap.conf"
pascal@18730 41 [ "$1" ] || if ( ps | grep -q squid ); then
erjo@11917 42 /etc/init.d/squid restart
erjo@11917 43 fi
erjo@11917 44 }
erjo@11917 45
al@20534 46 post_remove() {
pascal@18730 47 sed -i -e "s/.*squidclamav.*//" "$1/etc/c-icap/c-icap.conf"
al@20534 48 [ -n "$1" ] || if ( ps | grep -q squid ); then
erjo@11917 49 /etc/init.d/squid restart
erjo@11917 50 fi
al@20534 51 [ -n "$1" ] || if ( ps | grep -q c-icap ); then
erjo@12148 52 /etc/init.d/c-icapd restart
erjo@12148 53 fi
erjo@11917 54 }