diff options
Diffstat (limited to 'source/l/libtiff/libtiff.SlackBuild')
-rwxr-xr-x | source/l/libtiff/libtiff.SlackBuild | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/source/l/libtiff/libtiff.SlackBuild b/source/l/libtiff/libtiff.SlackBuild index 99f8eb32..3bdac49e 100755 --- a/source/l/libtiff/libtiff.SlackBuild +++ b/source/l/libtiff/libtiff.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2005-2013 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,8 +20,11 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=libtiff VERSION=${VERSION:-$(echo tiff-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=1 +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -33,6 +36,14 @@ if [ -z "$ARCH" ]; then esac fi +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + NUMJOBS=${NUMJOBS:-" -j7 "} if [ "$ARCH" = "i386" ]; then @@ -52,7 +63,6 @@ else LIBDIRSUFFIX="" fi -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-libtiff @@ -61,10 +71,9 @@ mkdir -p $PKG cd $TMP rm -rf tiff-$VERSION tar xvf $CWD/tiff-$VERSION.tar.?z* || exit 1 -cd tiff-$VERSION +cd tiff-$VERSION || exit 1 -zcat $CWD/libtiff-am-version.patch.gz | patch -p1 --verbose || exit 1 -zcat $CWD/libtiff-make-check.patch.gz | patch -p1 --verbose || exit 1 +#zcat $CWD/libtiff-am-version.patch.gz | patch -p1 --verbose || exit 1 chown -R root:root . find . \ @@ -81,10 +90,14 @@ CFLAGS="$SLKCFLAGS" \ --disable-static \ --program-prefix="" \ --program-suffix="" \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux || exit 1 make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 + +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + ( cd man ; make install-man DESTDIR=$PKG || exit 1 ) || exit 1 rm -r $PKG/usr/share ( cd $PKG |