wok-next view 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
line source
1 # SliTaz package receipt v2.
3 PACKAGE="squidclamav"
4 VERSION="6.10"
5 CATEGORY="security"
6 SHORT_DESC="Antivirus redirector for Squid proxy"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="http://squidclamav.darold.net/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 BUILD_DEPENDS="curl-dev c-icap-dev"
16 compile_rules() {
17 mkdir -p $install/etc
18 ./configure \
19 --libdir=/usr/lib \
20 --libexecdir=/var/www/cgi-bin \
21 $CONFIGURE_ARGS &&
22 fix libtool &&
23 make &&
24 make install || return 1
26 install -Dm644 $stuff/icap-clamav.conf $install/etc/squid/conf.d/icap-clamav.conf
27 }
29 genpkg_rules() {
30 copy @std
31 # Customise config file
32 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
33 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
34 $fs/etc/squidclamav.conf
35 DEPENDS="squid libcurl clamav c-icap squidguard"
36 CONFIG_FILES="/etc/squidclamav.conf"
37 }
39 post_install() {
40 echo 'Service squidclamav squidclamav.so' >> "$1/etc/c-icap/c-icap.conf"
41 [ "$1" ] || if ( ps | grep -q squid ); then
42 /etc/init.d/squid restart
43 fi
44 }
46 post_remove() {
47 sed -i -e "s/.*squidclamav.*//" "$1/etc/c-icap/c-icap.conf"
48 [ -n "$1" ] || if ( ps | grep -q squid ); then
49 /etc/init.d/squid restart
50 fi
51 [ -n "$1" ] || if ( ps | grep -q c-icap ); then
52 /etc/init.d/c-icapd restart
53 fi
54 }