mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
development/rust: Fixed ARCH for i?86.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
parent
1a3670d110
commit
9d29854d4a
1 changed files with 12 additions and 21 deletions
|
@ -28,38 +28,29 @@ VERSION=${VERSION:-1.5.0}
|
|||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
x86_64) ARCH=x86_64 ;;
|
||||
*) ARCH=i686 ;;
|
||||
esac
|
||||
fi
|
||||
ARCH=${ARCH:-$(uname -m)}
|
||||
case "$ARCH" in
|
||||
i?86) ARCH=i686
|
||||
LIBDIRSUFFIX=""
|
||||
;;
|
||||
x86_64) LIBDIRSUFFIX="64"
|
||||
;;
|
||||
*) echo "$ARCH is not supported"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -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
|
||||
mkdir -p $TMP $PKG $PKG/usr $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
rm -rf $PRGNAM-$VERSION-$ARCH-unknown-linux-gnu
|
||||
tar xvf $CWD/$PRGNAM-$VERSION-$ARCH-unknown-linux-gnu.tar.gz
|
||||
cd $PRGNAM-$VERSION-$ARCH-unknown-linux-gnu
|
||||
chown -R root:root .
|
||||
|
|
Loading…
Reference in a new issue