wok-6.x view squidclamav/receipt @ rev 14185

asterisk: remove wrong error trigger
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 11 19:01:08 2013 +0100 (2013-03-11)
parents cb60d8d42bfd
children 8bc27fb245c6
line source
1 # SliTaz package receipt.
3 PACKAGE="squidclamav"
4 VERSION="6.5"
5 CATEGORY="security"
6 SHORT_DESC="Antivirus redirector for Squid proxy."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://squidclamav.darold.net/"
10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
11 CONFIG_FILES="/etc/squidclamav.conf"
13 DEPENDS="squid libcurl clamav c_icap squidguard"
14 BUILD_DEPENDS="curl-dev c_icap-dev"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 mkdir -p $DESTDIR/etc
21 ./configure \
22 --prefix=/usr \
23 --libdir=/usr/lib \
24 --libexecdir=/var/www/cgi-bin \
25 --sysconfdir=/etc \
26 $CONFIGURE_ARGS &&
27 make && make install
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 mkdir -p $fs/usr \
34 $fs/etc/squid/conf.d
36 cp -a $install/etc $fs
37 cp -a $install/usr/lib $fs/usr
38 cp -a $install/var $fs/
39 cp -a $stuff/icap-clamav.conf $fs/etc/squid/conf.d
41 # Customise config file
42 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
43 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
44 $fs/etc/squidclamav.conf
46 rm -f $fs/usr/lib/c_icap/*.la
49 }
51 #Post install command
52 post_install()
53 {
54 echo 'Service squidclamav squidclamav.so' >> $1/etc/c-icap/c-icap.conf
55 if ( ps | grep -q squid ); then
56 /etc/init.d/squid restart
57 fi
58 }
60 #Post remove command
61 post_remove()
62 {
63 sed -i -e "s/.*squidclamav.*//" $1/etc/c-icap/c-icap.conf
64 if ( ps | grep -q squid ); then
65 /etc/init.d/squid restart
66 fi
67 if ( ps | grep -q c-icap ); then
68 /etc/init.d/c-icapd restart
69 fi
70 }