summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordsomero <xgizzmo@gmail.com>2010-05-21 23:12:16 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-23 23:15:37 -0500
commitbfbc8e8c6f321f926b56c03e71bed3e85f8a4364 (patch)
tree280d7bcda0cbec731265549ce39e6af1d059724a
parentca23c84aed69d40eca140b12efef869c321beaaa (diff)
downloadslackbuilds-bfbc8e8c6f321f926b56c03e71bed3e85f8a4364.tar.gz
system/twin: Miscellaneous cleanups.
-rw-r--r--system/twin/twin.SlackBuild20
1 files changed, 12 insertions, 8 deletions
diff --git a/system/twin/twin.SlackBuild b/system/twin/twin.SlackBuild
index aaf71d94bc..ab8c0045ff 100644
--- a/system/twin/twin.SlackBuild
+++ b/system/twin/twin.SlackBuild
@@ -26,10 +26,19 @@
PRGNAM=twin
VERSION=${VERSION:-0.6.1}
-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
@@ -70,13 +79,8 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
-( cd $PKG
- strip -g usr/lib/*.a
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null
-)
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mv $PKG/usr/share/man $PKG/usr/
( cd $PKG/usr/man || exit 1