#!/bin/sh # Slackware build script for GPXSee # Copyright 2018-2020, Nikolay Korotkiy # 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. PACKAGE="gpxsee" VERSION=${VERSION:-12.2} PACKAGE_EXT="gz" BUILD=${BUILD:-1} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="GPXSee-$VERSION.tar.$PACKAGE_EXT" URL="https://github.com/tumic0/GPXSee/archive/refs/tags/$VERSION.tar.$PACKAGE_EXT" get_source $SRC $URL unpack_source $SRC GPXSee-$VERSION # Fix display issue: square character instead of a white space # See https://github.com/tumic0/GPXSee/issues/93 patch -p0 < $CWD/fix_font_narrow_space.diff lrelease-qt5 gpxsee.pro qmake-qt5 \ PREFIX="/usr" \ QMAKE_CFLAGS+="$SLKCFLAGS" \ QMAKE_CXXFLAGS+="$SLKCFLAGS" \ gpxsee.pro make && make INSTALL_ROOT="$PKG" install mkdir -p $DOCS cp -a licence.txt *.md $DOCS fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi