summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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