summaryrefslogtreecommitdiff
path: root/misc/zyGrib/zyGrib.SlackBuild
diff options
context:
space:
mode:
authorPhilip Lacroix <slackph at posteo dot de>2017-06-03 23:41:00 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-06-06 07:56:15 +0700
commitaa43cff812429aecd862abdd9419f01c3fa0195d (patch)
treea851087d7a3cd7fff1e7123c158e95666d27f7e9 /misc/zyGrib/zyGrib.SlackBuild
parent67681484cd9e0f1d68cce53040fe87a785d8f457 (diff)
downloadslackbuilds-aa43cff812429aecd862abdd9419f01c3fa0195d.tar.gz
misc/zyGrib: Updated for version 8.0.1 + new maintainer.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'misc/zyGrib/zyGrib.SlackBuild')
-rw-r--r--misc/zyGrib/zyGrib.SlackBuild62
1 files changed, 31 insertions, 31 deletions
diff --git a/misc/zyGrib/zyGrib.SlackBuild b/misc/zyGrib/zyGrib.SlackBuild
index 5154d8d40f..34753bb65f 100644
--- a/misc/zyGrib/zyGrib.SlackBuild
+++ b/misc/zyGrib/zyGrib.SlackBuild
@@ -3,7 +3,9 @@
# Slackware build script for zyGrib
# Copyright 2011, 2012, 2013 Chris Abela, Malta
-# Copyright 2014 Ryan P.C. McQuen, WA, ryanpcmcquen@member.fsf.org
+# Copyright 2014 Ryan P.C. McQuen, WA
+# Copyright 2017 Philip Lacroix <slackph at posteo dot de>
+#
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +26,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=zyGrib
-VERSION=${VERSION:-7.0.0}
+VERSION=${VERSION:-8.0.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -41,31 +43,14 @@ 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
-# In case the source was fetched with wget or some other downloader:
-SRCTAR=$PRGNAM-$VERSION.tgz
-[ -e "getfile.php?file=$SRCTAR" ] && SRCTAR="getfile.php?file=$SRCTAR"
-
rm -rf $PKG
mkdir -p $TMP $PKG/opt/$PRGNAM $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$SRCTAR
+tar xvf $CWD/$PRGNAM-$VERSION.tgz
+
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -74,21 +59,36 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-make QMAKE=/usr/bin/qmake
+if [ "$ARCH" != x86_64 ]; then
+ # fixup for i586/i686 from Arch
+ sed -i -E 's:(^CFLAGS.*)-m64(.*)-D.*$:\1\2:' src/g2clib/makefile
+fi
+
+make QMAKE=/usr/bin/qmake-qt5
make install INSTALLDIR=$PKG/opt/$PRGNAM
-mkdir -p $PKG/usr/bin/
-ln -sfv /opt/$PRGNAM/$PRGNAM $PKG/usr/bin/$PRGNAM
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+PRGBIN=$PKG/usr/bin
+PRGSHR=$PKG/usr/share
+PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
-mkdir -p $PKG/usr/share/applications/ $PKG/usr/share/pixmaps/
-cat $CWD/zyGrib.desktop > $PKG/usr/share/applications/zyGrib.desktop
-cat $CWD/zyGrib.png > $PKG/usr/share/pixmaps/zyGrib.png
+# Move startup script, set path.
+mkdir -p $PRGBIN
+mv $PKG/opt/$PRGNAM/$PRGNAM $PRGBIN/
+sed -i "s~^cd .*~cd /opt/$PRGNAM~" $PRGBIN/$PRGNAM
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+mkdir -p $PRGSHR/{applications,pixmaps}
+cp -a $CWD/$PRGNAM.desktop $PRGSHR/applications/
+cp -a $CWD/$PRGNAM.png $PRGSHR/pixmaps/
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Install documentation (not available for zyGrib itself, hence the README).
+mkdir -p $PRGDOC/{qwt,g2clib}
+cp -a $CWD/README $PRGDOC/
+cp -a src/g2clib/README $PRGDOC/g2clib/
+cp -a src/qwt*/{README,COPYING} $PRGDOC/qwt/
+cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc