diff options
Diffstat (limited to 'source/l/jasper/jasper.SlackBuild')
-rwxr-xr-x | source/l/jasper/jasper.SlackBuild | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/source/l/jasper/jasper.SlackBuild b/source/l/jasper/jasper.SlackBuild index 45b0b0768..cda0001bd 100755 --- a/source/l/jasper/jasper.SlackBuild +++ b/source/l/jasper/jasper.SlackBuild @@ -1,7 +1,7 @@ #!/bin/sh # Copyright 2007, 2008 Eric Hameleers, Eijdhoven, NL -# Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # Permission to use, copy, modify, and distribute this software for @@ -23,10 +23,19 @@ # SUCH DAMAGE. -PRGNAM=jasper -VERSION=${VERSION:-1.900.1} -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-2} +PKGNAM=jasper +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-3} + +# 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 case "$ARCH" in i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -44,18 +53,21 @@ case "$ARCH" in athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" LIBDIRSUFFIX="" ;; + *) SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + ;; esac CWD=$(pwd) TMP=${TMP:-/tmp} -PKG=$TMP/package-$PRGNAM +PKG=$TMP/package-$PKGNAM rm -rf $PKG mkdir -p $TMP $PKG cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1 -cd $PRGNAM-$VERSION +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1 +cd $PKGNAM-$VERSION chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -80,10 +92,10 @@ CXXFLAGS="$SLKCFLAGS" \ make || exit 1 make DESTDIR=$PKG install -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ COPYRIGHT INSTALL LICENSE NEWS README \ - $PKG/usr/doc/$PRGNAM-$VERSION + $PKG/usr/doc/$PKGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; @@ -96,5 +108,5 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $TMP/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txz +/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz |