summaryrefslogtreecommitdiff
path: root/source/l/libzip
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/libzip')
-rwxr-xr-xsource/l/libzip/libzip.SlackBuild25
1 files changed, 19 insertions, 6 deletions
diff --git a/source/l/libzip/libzip.SlackBuild b/source/l/libzip/libzip.SlackBuild
index a8eb72a6..d7103a30 100755
--- a/source/l/libzip/libzip.SlackBuild
+++ b/source/l/libzip/libzip.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2007 Heinz Wiesinger <hmwiesinger@gmx.at>
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,9 +24,19 @@
# Modified by Robby Workman <rworkman at slackware.com>
-VERSION=0.9
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-2}
+PKGNAM=libzip
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | 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
NUMJOBS=${NUMJOBS:--j6}
@@ -43,13 +53,16 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf libzip-$VERSION
-tar xvf $CWD/libzip-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/libzip-$VERSION.tar.?z* || exit 1
cd libzip-$VERSION || exit 1
chown -R root:root .
find . \
@@ -107,7 +120,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" \
mkdir -p $PKG/usr/doc/libzip-$VERSION
cp -a \
- AUTHORS COPYING* INSTALL NEWS README THANKS TODO \
+ AUTHORS COPYING* INSTALL NEWS README* THANKS TODO \
$PKG/usr/doc/libzip-$VERSION
mkdir -p $PKG/install