summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2015-12-02 14:25:22 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-12-05 07:58:34 +0700
commit07f2cad306e430a6f96dfc087c11e2dbf8c60693 (patch)
tree5f576a36a2f81c26c52017574bc6c8219ded6184
parent7fd590d8e16446e4a12e0fef040ef7c195b45658 (diff)
downloadslackbuilds-07f2cad306e430a6f96dfc087c11e2dbf8c60693.tar.gz
system/clamav: Updated for version 0.99.
Check for libmilter availability Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--system/clamav/clamav.SlackBuild27
-rw-r--r--system/clamav/clamav.info6
-rw-r--r--system/clamav/doinst.sh2
3 files changed, 24 insertions, 11 deletions
diff --git a/system/clamav/clamav.SlackBuild b/system/clamav/clamav.SlackBuild
index cb8707ea4e..d009572a43 100644
--- a/system/clamav/clamav.SlackBuild
+++ b/system/clamav/clamav.SlackBuild
@@ -27,7 +27,7 @@
# No additional license terms added
PRGNAM=clamav
-VERSION=${VERSION:-0.98.7}
+VERSION=${VERSION:-0.99}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -86,18 +86,29 @@ else
with_jsonc=""
fi
+# Some people don't have sendmail installed: don't build milter stuff
+# in this case.
+# This is your call, not having sendmail is *UNSUPPORTED*
+if [ ! -f /usr/lib$LIBDIRSUFFIX/libmilter.a ]; then
+ milter="dis"
+ milter_cf=""
+else
+ milter="en"
+ milter_cf="clamav-milter"
+fi
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
@@ -142,7 +153,7 @@ CXXFLAGS="$SLKCFLAGS" \
--with-user=clamav \
--with-group=clamav \
--with-dbdir=/var/lib/clamav \
- --enable-milter \
+ --${milter}able-milter \
--enable-id-check \
--enable-clamdtop \
--disable-static \
@@ -154,7 +165,7 @@ make V=1
make install DESTDIR=$PKG
# Prepare the config files:
-for cf in clamd freshclam clamav-milter; do
+for cf in clamd freshclam $milter_cf; do
mv $PKG/etc/$cf.conf.sample $PKG/etc/$cf.conf.new
done
@@ -171,8 +182,10 @@ chmod 771 $PKG/var/lib/clamav $PKG/var/log/clamav $PKG/var/run/clamav
# Fixup some ownership and permissions issues
chown -R root:root $PKG
chmod -R o-w $PKG
-chown clamav $PKG/usr/sbin/clamav-milter
-chmod 4700 $PKG/usr/sbin/clamav-milter
+if [ "$milter" = "en" ]; then
+ chown clamav $PKG/usr/sbin/clamav-milter
+ chmod 4700 $PKG/usr/sbin/clamav-milter
+fi
chmod 0770 $PKG/var/lib/clamav
touch $PKG/var/lib/clamav/main.cvd $PKG/var/lib/clamav/daily.cvd
chmod 0660 $PKG/var/lib/clamav/*
diff --git a/system/clamav/clamav.info b/system/clamav/clamav.info
index 4365462691..6b478947db 100644
--- a/system/clamav/clamav.info
+++ b/system/clamav/clamav.info
@@ -1,8 +1,8 @@
PRGNAM="clamav"
-VERSION="0.98.7"
+VERSION="0.99"
HOMEPAGE="http://www.clamav.net/"
-DOWNLOAD="http://downloads.sourceforge.net/clamav/clamav-0.98.7.tar.gz"
-MD5SUM="157c601161da1c2d5a0e48ea1b49e067"
+DOWNLOAD="http://www.clamav.net/downloads/production/clamav-0.99.tar.gz"
+MD5SUM="ae79c3982761ba1815dbce17f846bab6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/system/clamav/doinst.sh b/system/clamav/doinst.sh
index 4d177d91b4..6ee0edcffc 100644
--- a/system/clamav/doinst.sh
+++ b/system/clamav/doinst.sh
@@ -27,7 +27,7 @@ preserve_perms() {
preserve_perms etc/rc.d/rc.clamav.new
config etc/freshclam.conf.new
config etc/clamd.conf.new
-config etc/clamav-milter.conf.new
+[ -f etc/clamav-milter.conf.new ] && config etc/clamav-milter.conf.new
config etc/logrotate.d/clamav.new
# Remove new log if one is already present
config var/log/clamav/clamd.log.new ; rm -f var/log/clamav/clamd.log.new