summaryrefslogtreecommitdiffstats
path: root/source/l/judy/judy.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/judy/judy.SlackBuild')
-rwxr-xr-xsource/l/judy/judy.SlackBuild28
1 files changed, 20 insertions, 8 deletions
diff --git a/source/l/judy/judy.SlackBuild b/source/l/judy/judy.SlackBuild
index 684807516..b4e098986 100755
--- a/source/l/judy/judy.SlackBuild
+++ b/source/l/judy/judy.SlackBuild
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2012 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
-# Copyright 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2014, 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,22 +21,32 @@
# 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=judy
VERSION=1.0.5
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
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:--j6}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -49,7 +59,6 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -76,11 +85,14 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--docdir=/usr/doc/$PKGNAM-$VERSION \
--disable-static \
- --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
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true