multimedia/acetoneiso: Fix build on x86.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Vijay Marcel 2022-11-20 17:42:41 +07:00 committed by Willy Sudiarto Raharjo
parent 14f6472d34
commit 322624b81a
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 20 additions and 4 deletions

View File

@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=acetoneiso
VERSION=${VERSION:-2.4.3}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -36,10 +36,12 @@ if [ -z "$ARCH" ]; then
i?86)
DEBARCH=i386
ARCH=i586
LIBDIRSUFFIX=""
;;
x86_64)
DEBARCH=amd64
ARCH=x86_64
LIBDIRSUFFIX="64"
;;
# unsupported
*)
@ -51,9 +53,11 @@ else
case "$ARCH" in
i?86)
DEBARCH=i386
LIBDIRSUFFIX=""
;;
x86_64)
DEBARCH=amd64
LIBDIRSUFFIX="64"
;;
# unsupported
*)
@ -84,9 +88,19 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -pv $PRGNAM
cd $PRGNAM
mv -v $CWD/acetoneiso_2.4-3+b1_amd64.deb $CWD/$PRGNAM-$VERSION.deb
ar -x $CWD/$PRGNAM-$VERSION.deb
tar xvf data.tar.xz -C $PKG
if [ "$DEBARCH" = "i386" ]; then
mv -v $CWD/acetoneiso_2.4-3+b1_i386.deb $CWD/$PRGNAM-$VERSION.deb
ar -x $CWD/$PRGNAM-$VERSION.deb
tar xvf data.tar.xz -C $PKG
elif [ "$DEBARCH" = "amd64" ]; then
mv -v $CWD/acetoneiso_2.4-3+b1_amd64.deb $CWD/$PRGNAM-$VERSION.deb
ar -x $CWD/$PRGNAM-$VERSION.deb
tar xvf data.tar.xz -C $PKG
else
echo "This program is not supported for your System Architecture"
fi
cd $PKG
chown -R root:root .
find -L . \
@ -95,6 +109,8 @@ 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 {} \;
cd ..
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