summaryrefslogtreecommitdiffstats
path: root/system/clamav
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2022-02-09 12:39:43 -0500
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-12 00:29:36 +0700
commit5b830037c7c7d5da42a597a4a7a30f15aed3044c (patch)
tree2620ce9537fe8905360e9a816809174607fc4621 /system/clamav
parent467983399a49995359156a54f1f77fcccd6e7180 (diff)
downloadslackbuilds-5b830037c7c7d5da42a597a4a7a30f15aed3044c.tar.gz
slackbuilds-5b830037c7c7d5da42a597a4a7a30f15aed3044c.tar.xz
system/clamav: Don't use wildcards for the source.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/clamav')
-rw-r--r--system/clamav/clamav.SlackBuild17
1 files changed, 15 insertions, 2 deletions
diff --git a/system/clamav/clamav.SlackBuild b/system/clamav/clamav.SlackBuild
index 7d1eb3b489..f56bb92f66 100644
--- a/system/clamav/clamav.SlackBuild
+++ b/system/clamav/clamav.SlackBuild
@@ -26,6 +26,7 @@
# 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)
@@ -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 \