diff options
Diffstat (limited to 'gis/qmapshack/qmapshack.SlackBuild')
-rw-r--r-- | gis/qmapshack/qmapshack.SlackBuild | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/gis/qmapshack/qmapshack.SlackBuild b/gis/qmapshack/qmapshack.SlackBuild index 0fa7de11c3..3262134a32 100644 --- a/gis/qmapshack/qmapshack.SlackBuild +++ b/gis/qmapshack/qmapshack.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for qmapshack -# Copyright 2015 Daniel Stolarski <daniel.stolarski@gmail.com> +# Copyright 2015-2020 Daniel Stolarski <daniel.stolarski@gmail.com> # # This program is free software. It comes without any warranty, to # the extent permitted by applicable law. You can redistribute it @@ -9,10 +9,13 @@ # To Public License, Version 2, as published by Sam Hocevar. See # http://sam.zoy.org/wtfpl/COPYING for more details. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=qmapshack -VERSION=${VERSION:-1.14.0} +VERSION=${VERSION:-1.17.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -22,7 +25,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} @@ -46,14 +56,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-V_$VERSION -tar xvf $CWD/${PRGNAM}-${VERSION}.tar.gz +rm -rf $PRGNAM-V_${VERSION} +tar xvf $CWD/${PRGNAM}-V_${VERSION}.tar.gz cd ${PRGNAM}-V_${VERSION} - -# Apply patches provided in the source tree -patch -p1 < FindPROJ4.patch -patch -p1 < FindQuaZip5.patch - chown -R root:root . find -L . \ @@ -92,4 +97,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh 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 |