wok-6.x view squidclamav/receipt @ rev 23835
Up axel (2.17.8), bluez (5.54), cpio (2.13), dnsmasq (2.81), libssh (0.9.4), unbound (1.10.1)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jun 01 09:34:18 2020 +0000 (2020-06-01) |
parents | 9e01bc6321ea |
children | 5317a720eaa1 |
line source
1 # SliTaz package receipt.
3 PACKAGE="squidclamav"
4 VERSION="6.16"
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 DEPENDS="c_icap clamav libcurl squid squidguard"
15 BUILD_DEPENDS="c_icap-dev curl-dev"
17 CONFIG_FILES="/etc/squidclamav.conf"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 mkdir -p $DESTDIR/etc
24 ./configure \
25 --prefix=/usr \
26 --libdir=/usr/lib \
27 --libexecdir=/var/www/cgi-bin \
28 --sysconfdir=/etc \
29 $CONFIGURE_ARGS &&
30 make &&
31 make install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr
38 mkdir -p $fs/etc/squid/conf.d
40 cp -a $install/etc $fs
41 cp -a $install/usr/lib $fs/usr
42 cp -a $install/var $fs
43 cp -a $stuff/icap-clamav.conf $fs/etc/squid/conf.d
45 # Customise configuration file
46 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
47 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
48 $fs/etc/squidclamav.conf
50 rm -f $fs/usr/lib/c_icap/*.la
51 }
53 #Post install command
54 post_install()
55 {
56 echo 'Service squidclamav squidclamav.so' >> "$1/etc/c-icap/c-icap.conf"
57 [ "$1" ] ||
58 if ( ps | grep -q squid )
59 then
60 /etc/init.d/squid restart
61 fi
62 }
64 #Post remove command
65 post_remove()
66 {
67 sed -i -e "s/.*squidclamav.*//" "$1/etc/c-icap/c-icap.conf"
68 [ "$1" ] ||
69 if ( ps | grep -q squid )
70 then
71 /etc/init.d/squid restart
72 fi
73 [ "$1" ] ||
74 if ( ps | grep -q c-icap )
75 then
76 /etc/init.d/c-icapd restart
77 fi
78 }