summaryrefslogtreecommitdiff
path: root/network/dansguardian/dansguardian.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/dansguardian/dansguardian.SlackBuild')
-rw-r--r--network/dansguardian/dansguardian.SlackBuild17
1 files changed, 16 insertions, 1 deletions
diff --git a/network/dansguardian/dansguardian.SlackBuild b/network/dansguardian/dansguardian.SlackBuild
index ef83b9b509..8b2717441b 100644
--- a/network/dansguardian/dansguardian.SlackBuild
+++ b/network/dansguardian/dansguardian.SlackBuild
@@ -51,10 +51,19 @@
PRGNAM=dansguardian
VERSION=${VERSION:-2.10.1.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
@@ -84,6 +93,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -101,6 +113,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix building with gcc4.4.
+patch -p1 < $CWD/dansguardian-2.10.1.1-gcc44.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \