wok-next view squidclamav/receipt @ rev 20636
Fix "can't execute '/usr/bin/update-mime-database': No such file or directory"
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Apr 27 15:12:17 2018 +0300 (2018-04-27) |
parents | 757d032c55c7 |
children | b84b01f3048e |
line source
1 # SliTaz package receipt v2.
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 WEB_SITE="http://squidclamav.darold.net/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 BUILD_DEPENDS="curl-dev c_icap-dev"
16 compile_rules() {
17 mkdir -p $DESTDIR/etc
18 ./configure \
19 --libdir=/usr/lib \
20 --libexecdir=/var/www/cgi-bin \
21 $CONFIGURE_ARGS &&
22 fix libtool &&
23 make &&
24 make install || return 1
26 install -Dm644 $stuff/icap-clamav.conf $install/etc/squid/conf.d/icap-clamav.conf
27 }
29 genpkg_rules() {
30 copy @std
31 # Customise config file
32 sed -i -e "s|^redirect.*|redirect http://localhost/cgi-bin/squidclamav/clwarn.cgi|" \
33 -e "s|^#squidguard.*|squidguard /usr/bin/squidGuard|" \
34 $fs/etc/squidclamav.conf
35 DEPENDS="squid libcurl clamav c_icap squidguard"
36 CONFIG_FILES="/etc/squidclamav.conf"
37 }
39 post_install() {
40 echo 'Service squidclamav squidclamav.so' >> "$1/etc/c-icap/c-icap.conf"
41 [ "$1" ] || if ( ps | grep -q squid ); then
42 /etc/init.d/squid restart
43 fi
44 }
46 post_remove() {
47 sed -i -e "s/.*squidclamav.*//" "$1/etc/c-icap/c-icap.conf"
48 [ -n "$1" ] || if ( ps | grep -q squid ); then
49 /etc/init.d/squid restart
50 fi
51 [ -n "$1" ] || if ( ps | grep -q c-icap ); then
52 /etc/init.d/c-icapd restart
53 fi
54 }