diff options
Diffstat (limited to 'source/n/nmap/nmap.SlackBuild')
-rwxr-xr-x | source/n/nmap/nmap.SlackBuild | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/source/n/nmap/nmap.SlackBuild b/source/n/nmap/nmap.SlackBuild index ddf13b9e..747836cc 100755 --- a/source/n/nmap/nmap.SlackBuild +++ b/source/n/nmap/nmap.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,11 +20,19 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=${PKGVERSION:-5.00} -ARCH=${ARCH:-x86_64} -NUMJOBS=${NUMJOBS:-" -j7 "} +VERSION=${VERSION:-5.21} 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 + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" @@ -37,8 +45,13 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi +NUMJOBS=${NUMJOBS:-" -j7 "} + CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-nmap @@ -105,6 +118,14 @@ cp -a COPYING* HACKING INSTALL $PKG/usr/doc/nmap-$VERSION fi ) +# 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/*-$VERSION) + cat CHANGELOG | head -n 1000 > $DOCSDIR/CHANGELOG + touch -r CHANGELOG $DOCSDIR/CHANGELOG +fi + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |