diff options
Diffstat (limited to 'gis/opencpn/opencpn.SlackBuild')
-rw-r--r-- | gis/opencpn/opencpn.SlackBuild | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/gis/opencpn/opencpn.SlackBuild b/gis/opencpn/opencpn.SlackBuild index a9225645b8460..f0d12e610b038 100644 --- a/gis/opencpn/opencpn.SlackBuild +++ b/gis/opencpn/opencpn.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for opencpn -# Copyright 2016 Matt Dinslage, Springfield, MO +# Copyright 2019 Matt Dinslage, Springfield, MO # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=opencpn -VERSION=${VERSION:-4.8.8} +VERSION=${VERSION:-5.0.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -70,8 +70,19 @@ 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 {} \; -#honor LIBDIRSUFFIX -patch -p1 < $CWD/opencpn-4.4.0-multilib-strict.patch +# Apply patches to fix following issues... +# Honor MANDIR +# Honor LIBSUFFIXDIR +# Fix building with newer cmake versions +for patch in $CWD/patches/* ; do + patch -p1 < $patch +done + +# opencpn does not have specific checks for Slackware so it +# defautls to a i386 arch. Change this for x86_64 +if [ "$ARCH" = "x86_64" ]; then + sed -i '0,/i386/s//x86_64/' CMakeLists.txt +fi mkdir -p build cd build @@ -91,12 +102,27 @@ cd .. 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 +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a INSTALL README data/doc/help_en_US.html data/license.txt $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION rm -rf $PKG/usr/share/doc cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# Add an icon to /usr/share/pixmaps so menu launcher has icon +mkdir -p $PKG/usr/share/pixmaps +convert $PKG/usr/share/icons/hicolor/scalable/apps/opencpn.svg -resize 256x256 \ + $PKG/usr/share/pixmaps/opencpn.png + +# OpenCPN only looks for plugins in the "lib" directories. We +# have to set an evnironment variable in order for OpenCPN to +# find plugins in "lib64" +if [ "$ARCH" = "x86_64" ]; then + sed -i 's,Exec=opencpn,Exec=env OPENCPN_PLUGIN_DIRS="/usr/lib64/opencpn" opencpn,g' $PKG/usr/share/applications/opencpn.desktop +fi + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh |