diff options
author | David Somero <xgizzmo@slackbuilds.org> | 2010-06-04 01:09:12 -0400 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-06-04 01:09:12 -0400 |
commit | d03ab41777e3f00a1bbf135586f921f7efaf080f (patch) | |
tree | 32e784c2dffabdc0c07747e5b18830e59183d3db /libraries/netcdf | |
parent | d159f73421fb8da5e3f7a59338314ce21fd291d0 (diff) | |
download | slackbuilds-d03ab41777e3f00a1bbf135586f921f7efaf080f.tar.gz |
libraries/netcdf: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'libraries/netcdf')
-rw-r--r-- | libraries/netcdf/netcdf.SlackBuild | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libraries/netcdf/netcdf.SlackBuild b/libraries/netcdf/netcdf.SlackBuild index 72d576329a..7b222d7c7a 100644 --- a/libraries/netcdf/netcdf.SlackBuild +++ b/libraries/netcdf/netcdf.SlackBuild @@ -25,10 +25,19 @@ PRGNAM=netcdf VERSION=4.0.1 -ARCH=${ARCH:-i486} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -43,6 +52,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e |