wok-next view squidclamav/receipt @ rev 21018
Nasty typo broke the cooker
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Oct 17 03:59:24 2018 +0300 (2018-10-17) |
parents | 10df65db91ad |
children | d5aab818505e |
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 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 }