diff options
Diffstat (limited to 'source/n/fetchmail/fetchmail.SlackBuild')
-rwxr-xr-x | source/n/fetchmail/fetchmail.SlackBuild | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/source/n/fetchmail/fetchmail.SlackBuild b/source/n/fetchmail/fetchmail.SlackBuild index 11145cc9..a69cef4d 100755 --- a/source/n/fetchmail/fetchmail.SlackBuild +++ b/source/n/fetchmail/fetchmail.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,19 +20,32 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=6.3.11 -ARCH=${ARCH:-x86_64} -NUMJOBS=${NUMJOBS:-" -j7 "} +PKGNAM=fetchmail +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | 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 + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" fi +NUMJOBS=${NUMJOBS:-" -j7 "} + CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-fetchmail @@ -78,7 +91,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" \ mkdir -p $PKG/usr/doc/fetchmail-$VERSION cp -a \ - ABOUT-NLS COPYING* FAQ FEATURES INSTALL NEWS NOTES README* TODO \ + ABOUT-NLS COPYING* FAQ FEATURES INSTALL NEWS* NOTES* README* TODO \ *.html contrib *.lsm \ $PKG/usr/doc/fetchmail-$VERSION |