summaryrefslogtreecommitdiffstats
path: root/source/l/libiodbc/libiodbc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/libiodbc/libiodbc.SlackBuild')
-rwxr-xr-xsource/l/libiodbc/libiodbc.SlackBuild21
1 files changed, 16 insertions, 5 deletions
diff --git a/source/l/libiodbc/libiodbc.SlackBuild b/source/l/libiodbc/libiodbc.SlackBuild
index c752d13ee..cd9fc3fad 100755
--- a/source/l/libiodbc/libiodbc.SlackBuild
+++ b/source/l/libiodbc/libiodbc.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2009, 2010 Eric Hameleers, Eindhoven, NL
-# Copyright 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2013, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
# Redistribution and use of this script, with or without modification, is
@@ -21,10 +21,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=libiodbc
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:--j6}
# Automatically determine the architecture we're building on:
@@ -37,7 +38,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-libiodbc
@@ -84,7 +92,7 @@ CFLAGS="$SLKCFLAGS" \
--disable-libodbc \
--program-prefix= \
--program-suffix= \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
# Disable rpath:
zcat $CWD/libiodbc.disable.rpath.diff.gz | patch -p1 --verbose || exit 1
@@ -93,6 +101,9 @@ zcat $CWD/libiodbc.disable.rpath.diff.gz | patch -p1 --verbose || 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
+
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null