summaryrefslogtreecommitdiff
path: root/system/clamav/clamav.SlackBuild
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 /system/clamav/clamav.SlackBuild
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>
Diffstat (limited to 'system/clamav/clamav.SlackBuild')
-rw-r--r--system/clamav/clamav.SlackBuild27
1 files changed, 20 insertions, 7 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/*