summaryrefslogtreecommitdiffstats
path: root/gis/pktools/pktools.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'gis/pktools/pktools.SlackBuild')
-rw-r--r--gis/pktools/pktools.SlackBuild22
1 files changed, 15 insertions, 7 deletions
diff --git a/gis/pktools/pktools.SlackBuild b/gis/pktools/pktools.SlackBuild
index ca31debb15..98edbb7593 100644
--- a/gis/pktools/pktools.SlackBuild
+++ b/gis/pktools/pktools.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# SlackBuild script for pktools
-# Copyright 2017-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2017-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,11 +24,14 @@
# (INCLUDING NEGLIGENCE OR 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)
+
PRGNAM=pktools
SRCNAM=$(echo $PRGNAM | tr "[a-z]" "[A-Z]")
VERSION=${VERSION:-2.6.7.6}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,7 +41,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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -73,7 +83,6 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
WITH_FANN=${FANN:-OFF}
-WITH_LIBLAS=${LIBLAS:-OFF}
mkdir -p build
cd build
@@ -85,7 +94,6 @@ cd build
-DINSTALL_LIBRARY_DIR=lib${LIBDIRSUFFIX} \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_WITH_FANN=$WITH_FANN \
- -DBUILD_WITH_LIBLAS=$WITH_LIBLAS \
..
make
@@ -109,4 +117,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE