aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-02-16 16:39:03 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-19 12:09:22 +0700
commit64cfcf14f00ed1092b9dc845a0f8f263a64ca423 (patch)
tree2fd59fb789a23e0804f4bca5e4e8a2228f7c2bb1 /libraries
parentec5329570f7e7bf5a1bc9b7aeb9a32aa0c9e5411 (diff)
libraries/avbin: Handle weird download filenames.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/avbin/avbin.SlackBuild24
1 files changed, 11 insertions, 13 deletions
diff --git a/libraries/avbin/avbin.SlackBuild b/libraries/avbin/avbin.SlackBuild
index ba8bb1acb2b64..b2d396336bb16 100644
--- a/libraries/avbin/avbin.SlackBuild
+++ b/libraries/avbin/avbin.SlackBuild
@@ -38,9 +38,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -73,23 +70,24 @@ fi
SRCNAM=install-$PRGNAM-linux-x86-$AR-v$VERSION
+# 20220216 bkw: depending on what was used to download the file, it
+# may have a bunch of amazon-gibberish in the filename
+CWDSRC="$CWD/$SRCNAM"
+if [ ! -e "$CWDSRC" ]; then
+ CWDSRC="$( /bin/ls $CWDSRC\?* | head -1)"
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -p $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
-chmod 0755 $CWD/$SRCNAM
-sh $CWD/$SRCNAM --noexec --target .
+sh "$CWDSRC" --noexec --target .
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 \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-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
+chmod 644 *
+
+strip --strip-unneeded *.so.*
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
install -D -m0755 lib${PRGNAM}.so.${VERSION} $PKG/usr/lib${LIBDIRSUFFIX}