diff options
Diffstat (limited to 'source/d/libtool/libtool.SlackBuild')
-rwxr-xr-x | source/d/libtool/libtool.SlackBuild | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/source/d/libtool/libtool.SlackBuild b/source/d/libtool/libtool.SlackBuild index fb833a72..75a0ff2c 100755 --- a/source/d/libtool/libtool.SlackBuild +++ b/source/d/libtool/libtool.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -9,7 +9,7 @@ # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, @@ -20,11 +20,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +VERSION=${VERSION:-$(echo libtool-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-2} -VERSION=1.5.26 -ARCH=${ARCH:-x86_64} -NUMJOBS=${NUMJOBS:-" -j7 "} -BUILD=${BUILD:-1} +NUMJOBS=${NUMJOBS:--j6} + +# 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} @@ -36,20 +45,21 @@ if [ "$ARCH" = "i486" ]; then elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" 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 libtool-$VERSION + tar xvf $CWD/libtool-$VERSION.tar.?z* || exit 1 + cd libtool-$VERSION chown -R root:root . find . \ @@ -60,7 +70,6 @@ find . \ zcat $CWD/libtool.no.moved.warning.diff.gz | patch -p1 --verbose || exit 1 - CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -70,7 +79,7 @@ CFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux make $NUMJOBS || make || exit 1 -make install DESTDIR=$PKG || exit 1 +make install DESTDIR=$PKG find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null @@ -81,12 +90,12 @@ gzip -9 $PKG/usr/info/* mkdir -p $PKG/usr/doc/libtool-$VERSION cp -a \ AUTHORS COPYING NEWS README THANKS TODO \ - $PKG/usr/doc/libtool-$VERSION + $PKG/usr/doc/libtool-$VERSION mkdir $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $TMP/libtool-$VERSION-$ARCH-$BUILD.txz +/sbin/makepkg -l y -c n $TMP/libtool-${VERSION}-$ARCH-$BUILD.txz |