summaryrefslogtreecommitdiff
path: root/source/l/exiv2/exiv2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/exiv2/exiv2.SlackBuild')
-rwxr-xr-xsource/l/exiv2/exiv2.SlackBuild38
1 files changed, 29 insertions, 9 deletions
diff --git a/source/l/exiv2/exiv2.SlackBuild b/source/l/exiv2/exiv2.SlackBuild
index 1292eb18..072bbfd9 100755
--- a/source/l/exiv2/exiv2.SlackBuild
+++ b/source/l/exiv2/exiv2.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2007 Frank Caraballo <fecaraballo{at}gmail{dot}com>
-# Copyright 2008, 2009, 2011, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2011, 2015, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +23,12 @@
# Modified by Robby Workman <rworkman at slackware.com>
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=exiv2
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+#VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo $PKGNAM-*-trunk.tar.xz | rev | cut -f 3- -d . | cut -f 2 -d - | rev)}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -37,7 +40,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-exiv2
NUMJOBS=${NUMJOBS:--j6}
@@ -59,9 +69,13 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf exiv2-$VERSION
-tar xvf $CWD/exiv2-$VERSION.tar.?z* || exit 1
-cd exiv2-$VERSION || exit 1
+rm -rf exiv2-$VERSION exiv2-trunk
+
+#tar xvf $CWD/exiv2-$VERSION.tar.?z* || exit 1
+#cd exiv2-$VERSION || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION-trunk.tar.xz || exit 1
+cd exiv2-trunk || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -82,11 +96,17 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-xmp \
--enable-video \
--enable-webready \
- --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
+
+# Make sure shared libraries are executable:
+chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/lib*.so.*
+
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null