summaryrefslogtreecommitdiff
path: root/system/clamav
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2021-09-06 23:26:13 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-09-16 00:45:29 +0700
commit30191141df82e8ee87138222a363df953f1f2652 (patch)
treee006564928637716a5b48af6643316551de7c5b2 /system/clamav
parent6966a21499e2f5644084722d4eda0dfc5ac87668 (diff)
downloadslackbuilds-30191141df82e8ee87138222a363df953f1f2652.tar.gz
system/clamav: Updated for version 0.104.0, switch to cmake.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/clamav')
-rw-r--r--system/clamav/clamav.SlackBuild73
-rw-r--r--system/clamav/clamav.info6
2 files changed, 26 insertions, 53 deletions
diff --git a/system/clamav/clamav.SlackBuild b/system/clamav/clamav.SlackBuild
index 53a153581f..aa16be14ab 100644
--- a/system/clamav/clamav.SlackBuild
+++ b/system/clamav/clamav.SlackBuild
@@ -30,7 +30,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=clamav
-VERSION=${VERSION:-0.103.3}
+VERSION=${VERSION:-0.104.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -88,26 +88,6 @@ elif ! getent passwd clamav 2>&1 > /dev/null; then
bailout ;
fi
-# check if json-c is there: if it is, build over it to enable
-# the file properties collection and analysis feature
-# http://blog.clamav.net/2014/11/intro-to-collection-and-analysis-of.html
-if pkg-config --exists json-c ; then
- with_jsonc="--with-libjson"
-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
@@ -153,32 +133,27 @@ sed \
-e "s/^\#ExitOnOOM/ExitOnOOM/" \
-i etc/clamd.conf.sample || exit 1
-autoreconf -fi
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --localstatedir=/var \
- --sysconfdir=/etc \
- --mandir=/usr/man \
- --with-user=clamav \
- --with-group=clamav \
- --with-dbdir=/var/lib/clamav \
- --${milter}able-milter \
- --enable-id-check \
- --enable-clamdtop \
- --disable-static \
- --disable-experimental \
- $with_jsonc \
- --build=$ARCH-slackware-linux
-
-make V=1
-make install DESTDIR=$PKG
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_FULL_LIBDIR=/usr/lib$LIBDIRSUFFIX \
+ -DAPP_CONFIG_DIRECTORY=/etc \
+ -DENABLE_MILTER=ON \
+ -DENABLE_SYSTEMD=OFF \
+ -DENABLE_TESTS=OFF \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+mv $PKG/usr/share/man $PKG/usr/man
+rm -fR $PKG/usr/share
# Prepare the config files:
-for cf in clamd freshclam $milter_cf; do
+for cf in clamd freshclam clamav-milter; do
mv $PKG/etc/$cf.conf.sample $PKG/etc/$cf.conf.new
done
@@ -196,10 +171,8 @@ chmod 0775 $PKG/var/lib/clamav
# Fixup some ownership and permissions issues
chown -R root:root $PKG
chmod -R o-w $PKG
-if [ "$milter" = "en" ]; then
- chown clamav $PKG/usr/sbin/clamav-milter
- chmod 4700 $PKG/usr/sbin/clamav-milter
-fi
+chown clamav $PKG/usr/sbin/clamav-milter
+chmod 4700 $PKG/usr/sbin/clamav-milter
touch $PKG/var/lib/clamav/main.cvd $PKG/var/lib/clamav/daily.cvd
chmod 0660 $PKG/var/lib/clamav/*
@@ -212,7 +185,7 @@ chmod 0660 $PKG/var/log/clamav/clamd.log.new \
chown -R clamav:clamav $PKG/var/lib/clamav $PKG/var/log/clamav \
$PKG/var/run/clamav
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Compress the man page(s)
diff --git a/system/clamav/clamav.info b/system/clamav/clamav.info
index e01fcb08e8..575dc9e787 100644
--- a/system/clamav/clamav.info
+++ b/system/clamav/clamav.info
@@ -1,8 +1,8 @@
PRGNAM="clamav"
-VERSION="0.103.3"
+VERSION="0.104.0"
HOMEPAGE="https://www.clamav.net/"
-DOWNLOAD="https://www.clamav.net/downloads/production/clamav-0.103.3.tar.gz"
-MD5SUM="f8dcf678953f6af056ddd5917bcc50c3"
+DOWNLOAD="https://www.clamav.net/downloads/production/clamav-0.104.0.tar.gz"
+MD5SUM="3f4789c09f5a35e9ea580edd5c3e54b6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""