summaryrefslogtreecommitdiffstats
path: root/gis/osm2pgsql/osm2pgsql.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'gis/osm2pgsql/osm2pgsql.SlackBuild')
-rw-r--r--gis/osm2pgsql/osm2pgsql.SlackBuild36
1 files changed, 24 insertions, 12 deletions
diff --git a/gis/osm2pgsql/osm2pgsql.SlackBuild b/gis/osm2pgsql/osm2pgsql.SlackBuild
index cf4ad3f47a..3131240f2d 100644
--- a/gis/osm2pgsql/osm2pgsql.SlackBuild
+++ b/gis/osm2pgsql/osm2pgsql.SlackBuild
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for osm2pgsql
# Copyright 2013-2021 Benjamin Trigona-Harany
+# Copyright 2024 Giancarlo Dessi, Cagliari, IT
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,10 +22,13 @@
# 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=osm2pgsql
-VERSION=${VERSION:-1.4.0}
+VERSION=${VERSION:-1.11.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -34,27 +38,35 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
+ARCH64="no"
+if [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+ ARCH64="yes"
else
- SLKCFLAGS="-O2"
+ SLKCFLAGS=""
LIBDIRSUFFIX=""
fi
set -e
+if [ $ARCH64 = "no" ]; then
+ echo "*****************************************"
+ echo "THIS PACKAGE DOES NOT SUPPORT YOUR SYSTEM"
+ echo "YOU NEED osm2pgsql-legacy package"
+ echo "*****************************************"
+ exit 1
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -97,4 +109,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