diff options
author | David Spencer <idlemoor@slackbuilds.org> | 2016-01-23 16:49:46 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-01-26 18:58:51 +0700 |
commit | 9d29854d4a2228decf48c43a591dd62710717af5 (patch) | |
tree | 17036cbbc8d4a45bf8ad445a0fa1cd43221a121c /development | |
parent | 1a3670d110b3058c8f992f5d2b2472a171d83341 (diff) | |
download | slackbuilds-9d29854d4a2228decf48c43a591dd62710717af5.tar.gz |
development/rust: Fixed ARCH for i?86.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/rust/rust.SlackBuild | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/development/rust/rust.SlackBuild b/development/rust/rust.SlackBuild index ce3e441e6f..6d20e8fa8f 100644 --- a/development/rust/rust.SlackBuild +++ b/development/rust/rust.SlackBuild @@ -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 . |