diff options
author | Giancarlo Dessi <slack@giand.it> | 2024-01-18 07:45:48 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-01-18 08:05:12 +0700 |
commit | f66aa0bd4370b76cf4b06170b2dcbc1578ccfd49 (patch) | |
tree | be2e3723a63602c77c6f45ea3248ba6e6dd2c260 /gis | |
parent | 861a4997194efeb0f58cdc33c8f1e1e605a7942f (diff) |
gis/osm2pgsql-legacy: Added (legacy version of osm2pgsql).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'gis')
-rw-r--r-- | gis/osm2pgsql-legacy/README | 8 | ||||
-rw-r--r-- | gis/osm2pgsql-legacy/osm2pgsql-legacy.SlackBuild | 119 | ||||
-rw-r--r-- | gis/osm2pgsql-legacy/osm2pgsql-legacy.info | 10 | ||||
-rw-r--r-- | gis/osm2pgsql-legacy/slack-desc | 19 |
4 files changed, 156 insertions, 0 deletions
diff --git a/gis/osm2pgsql-legacy/README b/gis/osm2pgsql-legacy/README new file mode 100644 index 000000000000..1a1c2617075e --- /dev/null +++ b/gis/osm2pgsql-legacy/README @@ -0,0 +1,8 @@ +This is the legacy version of osm2pgsql package. + +osm2pgsql is a utility program that converts OpenStreetMap data to +PostGIS-enabled PostgreSQL databases. + +osm2pgsql 1.9.2 is the latest version with support to 32 bit +architectures. If you have a Slackware64 and want to install a version +earlier than 1.9.2, please refer to osm2pgsql package. diff --git a/gis/osm2pgsql-legacy/osm2pgsql-legacy.SlackBuild b/gis/osm2pgsql-legacy/osm2pgsql-legacy.SlackBuild new file mode 100644 index 000000000000..a284fab5cd81 --- /dev/null +++ b/gis/osm2pgsql-legacy/osm2pgsql-legacy.SlackBuild @@ -0,0 +1,119 @@ +#!/bin/bash +# Slackware build script for osm2pgsql-legacy + +# 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 +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (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=osm2pgsql-legacy +SRCNAM=osm2pgsql +VERSION=${VERSION:-1.9.2} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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 + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +if [ -d /usr/doc/osm2pgsql-1* ]; then + echo "**********************************************************************" + echo "WARNING: an old installation of osm2pgsql is found in your system!" + echo "osm2pgsql-legacy could conflict with other installations of osm2pgsql." + echo "Please remove any previous packages installed before install this:" + echo "# removepkg osm2pgsql" + echo "**********************************************************************" + exit 1 +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_TESTS=OFF \ + -DWITH_LUAJIT=ON \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mv $PKG/usr/share/man $PKG/usr +gzip -9 $PKG/usr/man/man?/* + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING README.md \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +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 diff --git a/gis/osm2pgsql-legacy/osm2pgsql-legacy.info b/gis/osm2pgsql-legacy/osm2pgsql-legacy.info new file mode 100644 index 000000000000..fa90a8194690 --- /dev/null +++ b/gis/osm2pgsql-legacy/osm2pgsql-legacy.info @@ -0,0 +1,10 @@ +PRGNAM="osm2pgsql-legacy" +VERSION="1.9.2" +HOMEPAGE="https://osm2pgsql.org/" +DOWNLOAD="https://github.com/osm2pgsql-dev/osm2pgsql/archive/1.9.2.tar.gz" +MD5SUM="a133dbfdddaa634fdffb807567a62635" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="luajit nlohmann_json postgis" +MAINTAINER="Giancarlo Dessi" +EMAIL="slack@giand.it" diff --git a/gis/osm2pgsql-legacy/slack-desc b/gis/osm2pgsql-legacy/slack-desc new file mode 100644 index 000000000000..d80c0103c772 --- /dev/null +++ b/gis/osm2pgsql-legacy/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +osm2pgsql-legacy: osm2pgsql-legacy (convert OpenStreetMap data to PostGIS) +osm2pgsql-legacy: +osm2pgsql-legacy: osm2pgsql is a utility program that converts OpenStreetMap data to +osm2pgsql-legacy: PostGIS-enabled PostgreSQL databases. +osm2pgsql-legacy: This package supports also 32 bit architectures +osm2pgsql-legacy: +osm2pgsql-legacy: +osm2pgsql-legacy: Homepage: https://osm2pgsql.org/ +osm2pgsql-legacy: +osm2pgsql-legacy: +osm2pgsql-legacy: |