summaryrefslogtreecommitdiff
path: root/source/a/eject/eject.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/eject/eject.SlackBuild')
-rwxr-xr-xsource/a/eject/eject.SlackBuild21
1 files changed, 17 insertions, 4 deletions
diff --git a/source/a/eject/eject.SlackBuild b/source/a/eject/eject.SlackBuild
index 56d1e79f..c637ef55 100755
--- a/source/a/eject/eject.SlackBuild
+++ b/source/a/eject/eject.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +23,17 @@
PKGNAM=eject
VERSION=${VERSION:-2.1.5}
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-1}
-
+BUILD=${BUILD:-2}
+
+# 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}
@@ -39,6 +47,8 @@ elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
cd $TMP
@@ -46,6 +56,9 @@ rm -rf ${PKGNAM}
tar xjvf $CWD/${PKGNAM}-$VERSION.tar.bz2
cd ${PKGNAM}
+# Patch a problem with spaces in the pathname:
+zcat $CWD/eject.spaces.diff.gz | patch -p0 --verbose || exit 1
+
# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \