summaryrefslogtreecommitdiffstats
path: root/gis/libgeotiff/libgeotiff.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'gis/libgeotiff/libgeotiff.SlackBuild')
-rw-r--r--gis/libgeotiff/libgeotiff.SlackBuild35
1 files changed, 24 insertions, 11 deletions
diff --git a/gis/libgeotiff/libgeotiff.SlackBuild b/gis/libgeotiff/libgeotiff.SlackBuild
index 425706e1d2..e090ebf422 100644
--- a/gis/libgeotiff/libgeotiff.SlackBuild
+++ b/gis/libgeotiff/libgeotiff.SlackBuild
@@ -1,8 +1,11 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libgeotiff
# Copyright 2009 Marco Cecchetti (mrc.ildp@gmail.com)
+# Previously maintained by David Spencer <baildon.research@googlemail.com>
+# Copyright 2024 Gregory J. L. Tourte <artourter@gmail.com>
+#
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,12 +25,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Maintained by David Spencer <baildon.research@googlemail.com>
+
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=libgeotiff
-VERSION=${VERSION:-1.4.2}
+VERSION=${VERSION:-1.7.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +42,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}
@@ -66,10 +78,8 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$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 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
# We'll stick with autotools because the new cmake build is a train wreck.
# This means you don't get inline EPSG CSV, which isn't supported in
@@ -85,15 +95,18 @@ LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
--localstatedir=/var \
--mandir=/usr/man \
--datadir=/usr/share \
- --infodir=/usr/info \
--with-zlib=yes \
--with-jpeg=yes \
+ --with-proj=yes \
--disable-static \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -102,7 +115,7 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- COPYING ChangeLog LICENSE README \
+ ChangeLog COPYING LICENSE NEWS README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -110,4 +123,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