From b76270bf9e6dd375e495fec92140a79a79415d27 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Wed, 19 May 2010 08:58:23 +0000 Subject: Slackware 13.1 Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy! --- source/a/file/file.SlackBuild | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) (limited to 'source/a/file') diff --git a/source/a/file/file.SlackBuild b/source/a/file/file.SlackBuild index aaa0ca41..04c47856 100755 --- a/source/a/file/file.SlackBuild +++ b/source/a/file/file.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2005-2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2005-2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,12 +20,21 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=5.03 -ARCH=${ARCH:-x86_64} +VERSION=${VERSION:-$(echo file-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:--j7} +# 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="" @@ -35,24 +44,21 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-file + rm -rf $PKG mkdir -p $TMP $PKG - cd $TMP rm -rf file-$VERSION tar xvf $CWD/file-$VERSION.tar.?z* || exit 1 cd file-$VERSION || exit 1 - -# Make the default data directory /etc/file like it has always been: -zcat $CWD/file.etc.file.diff.gz | patch -p1 --verbose || exit 1 -# This is needed after the patch above: -autoreconf || exit 1 - chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -60,6 +66,11 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Make the default data directory /etc/file like it has always been: +zcat $CWD/file.etc.file.diff.gz | patch -p1 --verbose || exit 1 +# This is needed after the patch above: +autoreconf || exit 1 + # Don't spew warnings about using the flat text files zcat $CWD/file.quiet.diff.gz | patch -p1 -E --verbose || exit 1 # I don't know what this one does @@ -82,9 +93,16 @@ CFLAGS="$SLKCFLAGS" \ --disable-static \ --build=$ARCH-slackware-linux +# The generated $TMP/file-$VERSION/libtool is buggy. I don't know if this is supposed +# to work, but it certainly does, so... :-) +cat $(which libtool) > libtool + make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 +# Seems --disable-static has been ignored lately: +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmagic.a + # Is file really this much of a processing bottleneck? Doubtful. # # NOTE: Benchmarked flat files vs. .mgc June 2009, found no measurable -- cgit v1.2.3