diff options
Diffstat (limited to 'source/l/expat/expat.SlackBuild')
-rwxr-xr-x | source/l/expat/expat.SlackBuild | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/source/l/expat/expat.SlackBuild b/source/l/expat/expat.SlackBuild index 8c972bb6..94e7e3a5 100755 --- a/source/l/expat/expat.SlackBuild +++ b/source/l/expat/expat.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,9 +20,19 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=2.0.1 -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-1} +PKGNAM=expat +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +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 if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -33,6 +43,9 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi CWD=$(pwd) @@ -43,8 +56,11 @@ rm -rf $PKG mkdir -p $TMP $PKG cd $TMP rm -rf expat-$VERSION -tar xzvf $CWD/expat-$VERSION.tar.gz || exit 1 +tar xzvf $CWD/expat-$VERSION.tar.?z* || exit 1 cd expat-$VERSION + +zcat $CWD/expat-2.0.1-fixes-3.patch.gz | patch -p1 --verbose || exit 1 + chown -R root:root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; @@ -61,7 +77,7 @@ make install DESTDIR=$PKG ) mkdir -p $PKG/usr/doc/expat-$VERSION cp -a \ - COPYING Changes README doc/reference.html \ + COPYING* Changes README* doc/reference.html \ $PKG/usr/doc/expat-$VERSION gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/install |