aboutsummaryrefslogtreecommitdiff
path: root/network/thttpd/thttpd.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/thttpd/thttpd.SlackBuild')
-rw-r--r--network/thttpd/thttpd.SlackBuild15
1 files changed, 14 insertions, 1 deletions
diff --git a/network/thttpd/thttpd.SlackBuild b/network/thttpd/thttpd.SlackBuild
index cdfe75f30717c..7ec6f2fb55f77 100644
--- a/network/thttpd/thttpd.SlackBuild
+++ b/network/thttpd/thttpd.SlackBuild
@@ -25,10 +25,19 @@
PRGNAM=thttpd
VERSION=${VERSION:-2.25b}
-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
@@ -43,6 +52,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
# Set the directory to serve through HTTP
@@ -67,6 +79,7 @@ find . \
cat $CWD/patches/additional-input-validation-httpd.c.diff | patch -p1
cat $CWD/patches/fix-buffer-overflow.diff | patch -p1
cat $CWD/patches/fix-insecure-tmp-creation-CVE-2005-3124.diff | patch -p1
+cat $CWD/patches/thttpd-2.25b-glibc-2.10.patch | patch -p1
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \