wok view squidclamav/receipt @ rev 18704

liblo-dev: update deps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Dec 16 12:27:46 2015 +0100 (2015-12-16)
parents 8bc27fb245c6
children 9e01bc6321ea
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 LICENSE="GPL3"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://squidclamav.darold.net/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 CONFIG_FILES="/etc/squidclamav.conf"
14 DEPENDS="squid libcurl clamav c_icap squidguard"
15 BUILD_DEPENDS="curl-dev c_icap-dev"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 mkdir -p $DESTDIR/etc
22 ./configure \
23 --prefix=/usr \
24 --libdir=/usr/lib \
25 --libexecdir=/var/www/cgi-bin \
26 --sysconfdir=/etc \
27 $CONFIGURE_ARGS &&
28 make && make install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr \
35 $fs/etc/squid/conf.d
37 cp -a $install/etc $fs
38 cp -a $install/usr/lib $fs/usr
39 cp -a $install/var $fs/
40 cp -a $stuff/icap-clamav.conf $fs/etc/squid/conf.d
42 # Customise config file
43 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
44 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
45 $fs/etc/squidclamav.conf
47 rm -f $fs/usr/lib/c_icap/*.la
50 }
52 #Post install command
53 post_install()
54 {
55 echo 'Service squidclamav squidclamav.so' >> $1/etc/c-icap/c-icap.conf
56 if ( ps | grep -q squid ); then
57 /etc/init.d/squid restart
58 fi
59 }
61 #Post remove command
62 post_remove()
63 {
64 sed -i -e "s/.*squidclamav.*//" $1/etc/c-icap/c-icap.conf
65 if ( ps | grep -q squid ); then
66 /etc/init.d/squid restart
67 fi
68 if ( ps | grep -q c-icap ); then
69 /etc/init.d/c-icapd restart
70 fi
71 }