summaryrefslogtreecommitdiffstats
path: root/source/d/git/git.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/git/git.SlackBuild')
-rwxr-xr-xsource/d/git/git.SlackBuild23
1 files changed, 19 insertions, 4 deletions
diff --git a/source/d/git/git.SlackBuild b/source/d/git/git.SlackBuild
index bf00fcaed..7c8e9e34f 100755
--- a/source/d/git/git.SlackBuild
+++ b/source/d/git/git.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,10 +20,22 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=1.6.4
-ARCH=${ARCH:-x86_64}
-NUMJOBS=${NUMJOBS:-" -j7 "}
BUILD=${BUILD:-1}
+
+PKGNAM=git
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# 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
+
eval $(perl '-V:installvendorlib')
PERLDIR=$installvendorlib/$ARCH-linux-thread-multi/auto
@@ -42,6 +54,8 @@ elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
CWD=$(pwd)
@@ -70,6 +84,7 @@ cp -a \
contrib \
$PKG/usr/doc/git-$VERSION
( cd $PKG/usr/doc/git-$VERSION/Documentation ; rm *.1 *.3 *.7 )
+( cd $PKG/usr/doc/git-$VERSION && find . -name ".git*" -exec rm -r "{}" \; )
make $NUMJOBS \
prefix=/usr \