summaryrefslogtreecommitdiff
path: root/system/halevt/halevt.SlackBuild
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2010-05-24 11:13:05 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-05-24 11:13:05 -0500
commit8f3b98210df8db390fafaed214881fa86ef3cda2 (patch)
tree292ec665a998df748ba414466eff77d94962af01 /system/halevt/halevt.SlackBuild
parent306f3eac27f59743f3544cd4bf67d5d7f5911628 (diff)
downloadslackbuilds-8f3b98210df8db390fafaed214881fa86ef3cda2.tar.gz
system/halevt: Miscellaneous cleanups.
Diffstat (limited to 'system/halevt/halevt.SlackBuild')
-rw-r--r--system/halevt/halevt.SlackBuild24
1 files changed, 16 insertions, 8 deletions
diff --git a/system/halevt/halevt.SlackBuild b/system/halevt/halevt.SlackBuild
index 612feef66d..8fbb278c47 100644
--- a/system/halevt/halevt.SlackBuild
+++ b/system/halevt/halevt.SlackBuild
@@ -6,10 +6,19 @@
PRGNAM=halevt
VERSION=${VERSION:-0.1.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
@@ -24,6 +33,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
fi
set -e
@@ -60,19 +72,15 @@ make install DESTDIR=$PKG
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 {} \;
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
-cp -a ABOUT-NLS AUTHORS ChangeLog COPYING INSTALL NEWS README TODO \
+cp -a AUTHORS ChangeLog COPYING INSTALL NEWS README TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
-cp -a examples/{*.xml,*.sh} \
- $PKG/usr/doc/$PRGNAM-$VERSION/examples
+cp -a examples/{*.xml,*.sh} $PKG/usr/doc/$PRGNAM-$VERSION/examples
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install