summaryrefslogtreecommitdiffstats
path: root/games/FlightGear/FlightGear.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/FlightGear/FlightGear.SlackBuild')
-rw-r--r--games/FlightGear/FlightGear.SlackBuild54
1 files changed, 28 insertions, 26 deletions
diff --git a/games/FlightGear/FlightGear.SlackBuild b/games/FlightGear/FlightGear.SlackBuild
index 77920a9421..8b9365f1b6 100644
--- a/games/FlightGear/FlightGear.SlackBuild
+++ b/games/FlightGear/FlightGear.SlackBuild
@@ -1,8 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for FlightGear
# Copyright before version 2016.3.1 by Diego Pantano <poplin.dp@gmail.com>
# Copyright 2016-2018 Panagiotis Nikolaou, Culver City, CA
+# Copyright 2019, 2020 Lenard Spencer, Orlando, Florida, USA
+
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +24,14 @@
# 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=FlightGear
SRCNAM=flightgear
-VERSION=${VERSION:-2019.1.1}
+VERSION=${VERSION:-2020.3.19}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +41,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}
@@ -57,18 +69,11 @@ fi
set -e
-# Choose if we build the internal Qt launcher.
-if [ "${QT5}" == "yes" ]; then
- OPT="$OPT -DENABLE_QT=ON"
-else
- OPT="$OPT -DENABLE_QT=OFF"
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.?z*
+tar xvf $CWD/$SRCNAM-${VERSION}.tar.?z*
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
@@ -80,13 +85,13 @@ find -L . \
mkdir -p build
cd build
cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DEVENT_INPUT:STRING="ON" \
+ -DEVENT_INPUT="ON" \
-DFG_DATA_DIR=/usr/share/${PRGNAM} \
- $OPT \
- -DCMAKE_BUILD_TYPE=Release ..
+ -DCMAKE_BUILD_TYPE=Release \
+ -DFG_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
cd ..
@@ -101,7 +106,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 \
- AUTHORS ChangeLog COPYING INSTALL NEWS README* Thanks docs-mini/ \
+ AUTHORS ChangeLog COPYING NEWS README* Thanks docs-mini/ \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -109,14 +114,11 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
# Add a desktop entry for the GUI launcher
-case "$QT5" in
- yes) install -D -m0644 $CWD/FlightGear.desktop \
- $PKG/usr/share/applications/FlightGear.desktop
- install -D -m0644 $CWD/FlightGear.png \
- $PKG/usr/share/icons/hicolor/64x64/apps/FlightGear.png
- cat $CWD/doinst.sh > $PKG/install/doinst.sh
-;;
-esac
+install -D -m0644 $CWD/FlightGear.desktop \
+ $PKG/usr/share/applications/FlightGear.desktop
+install -D -m0644 $CWD/FlightGear.png \
+ $PKG/usr/share/icons/hicolor/48x48/apps/FlightGear.png
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
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