diff options
Diffstat (limited to 'source/n/bridge-utils')
-rwxr-xr-x | source/n/bridge-utils/bridge-utils.SlackBuild | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/source/n/bridge-utils/bridge-utils.SlackBuild b/source/n/bridge-utils/bridge-utils.SlackBuild index 0772a887..eb31d6ef 100755 --- a/source/n/bridge-utils/bridge-utils.SlackBuild +++ b/source/n/bridge-utils/bridge-utils.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# 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 @@ -20,10 +20,19 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -VERSION=1.2 -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-2} +PKGNAM=bridge-utils +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:-" -j7 "} @@ -36,6 +45,9 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi CWD=$(pwd) @@ -83,13 +95,21 @@ gzip -9 $PKG/usr/man/man8/*.8 mkdir -p $PKG/usr/doc/bridge-utils-$VERSION cp -a \ - AUTHORS COPYING ChangeLog README THANKS TODO \ + AUTHORS COPYING* README* THANKS TODO \ doc \ $PKG/usr/doc/bridge-utils-$VERSION ( cd $PKG/usr/doc/bridge-utils-$VERSION/doc rm -f Makefile Makefile.in RPM-GPG-KEY brctl.8 ) +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi + # Finish up the package: mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |