academic/finchtv: Fix ARCH section.

Signed-off-by: bedlam <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
D Woodfall 2023-05-16 19:36:05 +01:00 committed by Willy Sudiarto Raharjo
parent 258eaf03ea
commit c172e6c4d7
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -31,7 +31,19 @@ TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
SRCVER=1_3_1
ARCH=i386 # This will work on a stock Slackware64 as well.
# 2023-05-16 DW: check for ARCH and kick wronguns
if [ -z "$ARCH" ]; then
case "$ARCH" in
i?86) ARCH=i586 ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if ! [ "$ARCH" = "x86_64" ] && ! [[ $ARCH =~ i?86 ]]; then
printf "\n$ARCH is not supported... \n" >/dev/stderr
exit 1
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
@ -60,7 +72,7 @@ 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 {} \;
install -D -m755 $PRGNAM $PKG/usr/bin/$PRGNAM
install -D -m 755 $PRGNAM $PKG/usr/bin/$PRGNAM
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