wok-backports view squidclamav/receipt @ rev 25

Add: squid*
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Mon Mar 03 23:33:10 2014 +0100 (2014-03-03)
parents
children
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 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr \
36 $fs/etc/squid/conf.d
38 cp -a $install/etc $fs
39 cp -a $install/usr/lib $fs/usr
40 cp -a $install/var $fs/
41 cp -a $stuff/icap-clamav.conf $fs/etc/squid/conf.d
43 # Customise config file
44 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
45 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
46 $fs/etc/squidclamav.conf
48 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 [ -z $1 ]; then
56 if ( ps | grep -q squid ); then
57 /etc/init.d/squid restart
58 fi
59 fi
60 }
62 #Post remove command
63 post_remove()
64 {
65 sed -i -e "s/.*squidclamav.*//" $1/etc/c-icap/c-icap.conf
66 if ( ps | grep -q squid ); then
67 /etc/init.d/squid restart
68 fi
69 if ( ps | grep -q c-icap ); then
70 /etc/init.d/c-icapd restart
71 fi
72 }