diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2010-05-24 14:31:35 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-24 16:10:23 -0500 |
commit | c4eaa5ab406557c8925d10864947fe54275d7da4 (patch) | |
tree | c3fcbf4188035c8786ae7d688c75b3239ba1d954 /development | |
parent | be9907d9f46efc286d1f64529a9804e6c2de4e8b (diff) |
development/mtd-utils: Miscellaneous cleanups.
Diffstat (limited to 'development')
-rw-r--r-- | development/mtd-utils/mtd-utils.SlackBuild | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/development/mtd-utils/mtd-utils.SlackBuild b/development/mtd-utils/mtd-utils.SlackBuild index 3b2da37a43cfd..3957997ef916c 100644 --- a/development/mtd-utils/mtd-utils.SlackBuild +++ b/development/mtd-utils/mtd-utils.SlackBuild @@ -6,10 +6,19 @@ PRGNAM=mtd-utils VERSION=${VERSION:-1.2.0} -ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +# 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 + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -17,11 +26,16 @@ 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 @@ -49,10 +63,7 @@ make install \ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYING $PKG/usr/doc/$PRGNAM-$VERSION |