diff options
Diffstat (limited to 'source/n/cyrus-sasl/cyrus-sasl.SlackBuild')
-rwxr-xr-x | source/n/cyrus-sasl/cyrus-sasl.SlackBuild | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/source/n/cyrus-sasl/cyrus-sasl.SlackBuild b/source/n/cyrus-sasl/cyrus-sasl.SlackBuild index c4aebb48..27512039 100755 --- a/source/n/cyrus-sasl/cyrus-sasl.SlackBuild +++ b/source/n/cyrus-sasl/cyrus-sasl.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,10 +20,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=2.1.23 -ARCH=${ARCH:-x86_64} +PKGNAM=cyrus-sasl +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-cyrus-sasl @@ -37,14 +47,17 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi rm -rf $PKG mkdir -p $TMP $PKG cd $TMP rm -rf cyrus-sasl-$VERSION -tar xvf $CWD/cyrus-sasl-$VERSION.tar.?z* -cd cyrus-sasl-$VERSION +tar xvf $CWD/cyrus-sasl-$VERSION.tar.?z* || exit 1 +cd cyrus-sasl-$VERSION || exit 1 chown -R root:root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; @@ -66,8 +79,8 @@ CFLAGS="$SLKCFLAGS" \ # How stupid that I need to specify 'sasldir' again for 'make' or else you get # the warning "Plugins are being installed into /usr/lib/sasl2, but the library # will look for them in /usr/lib64/sasl2" and advised to create a symlink... -make sasldir=/usr/lib${LIBDIRSUFFIX}/sasl2 -make sasldir=/usr/lib${LIBDIRSUFFIX}/sasl2 install DESTDIR=$PKG +make sasldir=/usr/lib${LIBDIRSUFFIX}/sasl2 || exit 1 +make sasldir=/usr/lib${LIBDIRSUFFIX}/sasl2 install DESTDIR=$PKG || exit 1 ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null @@ -81,7 +94,7 @@ cat saslauthd/saslauthd.mdoc > $PKG/usr/man/man8/saslauthd.8 gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/usr/doc/cyrus-sasl-$VERSION cp -a \ - AUTHORS COPYING INSTALL NEWS README README.andrew \ + AUTHORS COPYING* INSTALL NEWS README* \ doc \ $PKG/usr/doc/cyrus-sasl-$VERSION find $PKG/usr/doc/cyrus-sasl-$VERSION -type f -exec chmod 644 {} \; |