diff options
Diffstat (limited to 'system/clamav/clamav.SlackBuild')
-rw-r--r-- | system/clamav/clamav.SlackBuild | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/system/clamav/clamav.SlackBuild b/system/clamav/clamav.SlackBuild index aa16be14ab..77fad8b7b2 100644 --- a/system/clamav/clamav.SlackBuild +++ b/system/clamav/clamav.SlackBuild @@ -1,7 +1,7 @@ #!/bin/bash # Copyright (c) 2006,2007 Eric Hameleers <alien@slackware.com> -# Copyright (c) 2011-2021 Matteo Bernardini <ponce@slackbuilds.org> +# Copyright (c) 2011-2024 Matteo Bernardini <ponce@slackbuilds.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,18 +26,19 @@ # Version bump and various other changes by Robby Workman # New version bump and various other changes by Matteo Bernardini # No additional license terms added +# Code to deal with multiple copies of the source by B. Watson cd $(dirname $0) ; CWD=$(pwd) PRGNAM=clamav -VERSION=${VERSION:-0.104.0} +VERSION=${VERSION:-1.3.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i586 ;; + i?86) ARCH=i686 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -90,12 +91,24 @@ fi set -e +# 20220209 bkw: the download filename ends up with a bunch of +# gibberish (CGI params) if you use wget... I ended up with 2 copies +# of the tarball with different gibberish in the names, and the "tar +# xvf $CWD/$PRGNAM-$VERSION.tar.?z*" meant that both were passed as +# args to tar (making it fail). So be a little more paranoid about +# the filename. +TARBALL=$CWD/$PRGNAM-$VERSION.tar.gz +if [ ! -e "$TARBALL" ]; then + T="$( /bin/ls $CWD/$PRGNAM-$VERSION.tar.gz\?* 2>/dev/null | head -1 )" + [ -n "$T" ] && TARBALL="$T" +fi + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* -cd $PRGNAM-$VERSION || exit 1 +tar xvf $TARBALL +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -103,6 +116,13 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +export PATH="/opt/rust16/bin:$PATH" +if [ -z "$LD_LIBRARY_PATH" ]; then + export LD_LIBRARY_PATH="/opt/rust16/lib$LIBDIRSUFFIX" +else + export LD_LIBRARY_PATH="/opt/rust16/lib$LIBDIRSUFFIX:$LD_LIBRARY_PATH" +fi + # Specify the desired mirror in the update config file # http://www.iana.org/cctld/cctld-whois.htm sed -i "s/^\#DatabaseMirror.*/DatabaseMirror db.${COUNTRY}.clamav.net/" \ @@ -144,6 +164,8 @@ cd build -DENABLE_MILTER=ON \ -DENABLE_SYSTEMD=OFF \ -DENABLE_TESTS=OFF \ + -DDATABASE_DIRECTORY=/var/lib/clamav \ + -DENABLE_EXTERNAL_MSPACK=ON \ -DCMAKE_BUILD_TYPE=Release .. make make install DESTDIR=$PKG |