summaryrefslogtreecommitdiff
path: root/source/ap/cdparanoia/cdparanoia.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/cdparanoia/cdparanoia.SlackBuild')
-rwxr-xr-xsource/ap/cdparanoia/cdparanoia.SlackBuild19
1 files changed, 16 insertions, 3 deletions
diff --git a/source/ap/cdparanoia/cdparanoia.SlackBuild b/source/ap/cdparanoia/cdparanoia.SlackBuild
index 200fc6bb..0d2ba1a7 100755
--- a/source/ap/cdparanoia/cdparanoia.SlackBuild
+++ b/source/ap/cdparanoia/cdparanoia.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,20 @@
VERSION=III-10.2
-ARCH=${ARCH:-x86_64}
-NUMJOBS=${NUMJOBS:-" -j7 "}
BUILD=${BUILD:-1}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-cdparanoia
@@ -39,6 +49,9 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
rm -rf $PKG