diff options
Diffstat (limited to 'system/hercules/hercules.SlackBuild')
-rw-r--r-- | system/hercules/hercules.SlackBuild | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/system/hercules/hercules.SlackBuild b/system/hercules/hercules.SlackBuild index c070c65c4d..a8f684555f 100644 --- a/system/hercules/hercules.SlackBuild +++ b/system/hercules/hercules.SlackBuild @@ -6,14 +6,21 @@ # Written by Niels Horn - niels.horn@gmail.com # revision date 2010/03/10 -set -e - PRGNAM=hercules VERSION=${VERSION:-3.07} -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 @@ -35,8 +42,14 @@ elif [ "$ARCH" = "arm" ]; then SLKCFLAGS="-O2 -march=armv4t" LIBDIRSUFFIX="" ARCHQUADLET="-gnueabi" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + ARCHQUADLET="" fi +set -e + rm -rf $TMP/$PRGNAM-$VERSION $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -62,10 +75,7 @@ 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 {} \; # Copy standard configuration file to /etc mkdir -p $PKG/etc |