wok-next view squidclamav/receipt @ rev 20534

Clean default configure options when site script used.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 30 19:31:50 2018 +0300 (2018-03-30)
parents 9e01bc6321ea
children 10df65db91ad
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 $DESTDIR/etc
18 ./configure \
19 --libdir=/usr/lib \
20 --libexecdir=/var/www/cgi-bin \
21 $CONFIGURE_ARGS &&
22 make &&
23 make install || return 1
25 install -Dm644 $stuff/icap-clamav.conf $install/etc/squid/conf.d/icap-clamav.conf
26 }
28 genpkg_rules() {
29 copy @std
30 # Customise config file
31 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
32 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
33 $fs/etc/squidclamav.conf
34 DEPENDS="squid libcurl clamav c_icap squidguard"
35 CONFIG_FILES="/etc/squidclamav.conf"
36 }
38 post_install() {
39 echo 'Service squidclamav squidclamav.so' >> "$1/etc/c-icap/c-icap.conf"
40 [ "$1" ] || if ( ps | grep -q squid ); then
41 /etc/init.d/squid restart
42 fi
43 }
45 post_remove() {
46 sed -i -e "s/.*squidclamav.*//" "$1/etc/c-icap/c-icap.conf"
47 [ -n "$1" ] || if ( ps | grep -q squid ); then
48 /etc/init.d/squid restart
49 fi
50 [ -n "$1" ] || if ( ps | grep -q c-icap ); then
51 /etc/init.d/c-icapd restart
52 fi
53 }