wok view squidclamav/receipt @ rev 14813

Up: squidclamav (6.10)
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Wed Jul 17 13:38:51 2013 +0200 (2013-07-17)
parents 39ba49fbb762
children 5286a067ac76
line source
1 # SliTaz package receipt.
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 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 }