diff options
Diffstat (limited to 'source/n/iw/iw.SlackBuild')
-rwxr-xr-x | source/n/iw/iw.SlackBuild | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/source/n/iw/iw.SlackBuild b/source/n/iw/iw.SlackBuild index 66a4aa7b..bd78d0e0 100755 --- a/source/n/iw/iw.SlackBuild +++ b/source/n/iw/iw.SlackBuild @@ -1,7 +1,7 @@ #!/bin/sh # Copyright 2008 Robert Simpson, Ventura, California, USA -# Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,14 +22,23 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -PRGNAM=iw -VERSION=${VERSION:-0.9.14} -ARCH=${ARCH:-x86_64} +PKGNAM=iw +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 + CWD=$(pwd) TMP=${TMP:-/tmp} -PKG=$TMP/package-$PRGNAM +PKG=$TMP/package-$PKGNAM if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -37,14 +46,16 @@ elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" fi rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1 -cd $PRGNAM-$VERSION || exit 1 +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1 +cd $PKGNAM-$VERSION || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -65,14 +76,14 @@ make install \ xargs strip --strip-unneeded 2> /dev/null ) -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION cp -a \ - COPYING README \ - $PKG/usr/doc/$PRGNAM-$VERSION + COPYING* README* \ + $PKG/usr/doc/$PKGNAM-$VERSION 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 |