system/uif2iso: Switch to i586.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
David Woodfall 2018-03-27 12:35:52 +00:00 committed by Willy Sudiarto Raharjo
parent 11c746cbf0
commit 42b554641b

View file

@ -2,7 +2,7 @@
# Slackware build script for uif2iso
# Copyright 2009 David Woodfall <dave@unrealize.co.uk>
# Copyright 2009 David Woodfall <dave@dawoodfall.net>
# All rights reserved.
#
# aka dive in #slackware on freenode.net
@ -28,12 +28,12 @@
PRGNAM=uif2iso
VERSION=${VERSION:-0.1.7c}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
i?87) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@ -44,6 +44,20 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
@ -51,7 +65,7 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
unzip $CWD/$PRGNAM.zip -d $TMP/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION/src
cd $TMP/$PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@ -59,9 +73,10 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
sed -i 's/\/local//g' Makefile
make
make install DESTDIR=$PKG
sed -i 's/\/local//g' src/Makefile
CFLAGS="$SLKCFLAGS" \
make -C src all
make -C src install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@ -78,5 +93,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}