summaryrefslogtreecommitdiffstats
path: root/source/xap/xlockmore/xlockmore.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/xlockmore/xlockmore.SlackBuild')
-rwxr-xr-xsource/xap/xlockmore/xlockmore.SlackBuild28
1 files changed, 22 insertions, 6 deletions
diff --git a/source/xap/xlockmore/xlockmore.SlackBuild b/source/xap/xlockmore/xlockmore.SlackBuild
index f25bf14e1..09ce261f2 100755
--- a/source/xap/xlockmore/xlockmore.SlackBuild
+++ b/source/xap/xlockmore/xlockmore.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2011 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,19 +21,36 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=5.28
-ARCH=${ARCH:-x86_64}
-NUMJOBS=${NUMJOBS:-" -j7 "}
+PKGNAM=xlockmore
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
+# 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
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC -lcrypt"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-xlockmore
@@ -74,14 +91,13 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--without-dtsaver \
--without-ttf \
- --without-gtk \
--without-rplay \
--without-nas \
--disable-bomb \
--without-motif \
--without-esound \
--without-gtk \
- $ARCH-slackware-linux
+ --build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
cd xlock