diff options
Diffstat (limited to 'source/n/crda/crda.SlackBuild')
-rwxr-xr-x | source/n/crda/crda.SlackBuild | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/source/n/crda/crda.SlackBuild b/source/n/crda/crda.SlackBuild index 93ffcd64..20c96fac 100755 --- a/source/n/crda/crda.SlackBuild +++ b/source/n/crda/crda.SlackBuild @@ -1,7 +1,7 @@ #!/bin/sh # Copyright 2009 Robby Workman, Northport, AL, USA -# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2009, 2010, 2016 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,31 +22,32 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=${VERSION:-1.1.1} -BUILD=${BUILD:-1} +VERSION=${VERSION:-3.18} +BUILD=${BUILD:-3} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; esac fi -REGDBVERS=git_20100502 +REGDBVERS=2016.02.08 CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-crda -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" elif [ "$ARCH" = "arm" ]; then SLKCFLAGS="-O2 -march=armv4 -mtune=xscale" elif [ "$ARCH" = "armel" ]; then @@ -60,7 +61,7 @@ mkdir -p $TMP $PKG # First, we need to install the wireless regulatory bin cd $TMP -tar xvf $CWD/wireless-regdb-$REGDBVERS.tar.bz2 || exit 1 +tar xvf $CWD/wireless-regdb-$REGDBVERS.tar.xz || exit 1 cd wireless-regdb-$REGDBVERS || exit 1 chown -R root:root . find . \ @@ -89,8 +90,21 @@ find . \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -make CFLAGS="$SLKCFLAGS" MANDIR=/usr/man || exit 1 -make install MANDIR=/usr/man DESTDIR=$PKG || exit 1 + +# There's some weirdness going on here, but this seems to fix it: +make ; make clean ; make + +make \ + CFLAGS="$SLKCFLAGS" \ + MANDIR=/usr/man \ + LIBDIR=/usr/lib${LIBDIRSUFFIX} \ + || exit 1 +make install \ + CFLAGS="$SLKCFLAGS" \ + MANDIR=/usr/man \ + LIBDIR=/usr/lib${LIBDIRSUFFIX} \ + DESTDIR=$PKG \ + || exit 1 find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |