diff options
author | Philip Lacroix <slackph at posteo dot de> | 2017-02-17 22:37:45 +0000 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2017-02-17 22:39:34 +0000 |
commit | 8e6534c6c983c3929004bc87d5b397445b9ba976 (patch) | |
tree | 440d826be2d8a8935a026063ac7faec2154ef6ed /games | |
parent | 114c84e570e74bbc42e09cde3ae655c81e9d72f6 (diff) |
games/ffgo: Added (graphical launcher for FlightGear).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r-- | games/ffgo/README | 4 | ||||
-rw-r--r-- | games/ffgo/doinst.sh | 15 | ||||
-rw-r--r-- | games/ffgo/ffgo.SlackBuild | 99 | ||||
-rw-r--r-- | games/ffgo/ffgo.info | 10 | ||||
-rw-r--r-- | games/ffgo/slack-desc | 19 |
5 files changed, 147 insertions, 0 deletions
diff --git a/games/ffgo/README b/games/ffgo/README new file mode 100644 index 0000000000000..d64c280425f36 --- /dev/null +++ b/games/ffgo/README @@ -0,0 +1,4 @@ +FFGo is a graphical launcher for FlightGear, i.e. a program whose purpose is to +allow an easy assembling and running of a fgfs command line. It is a fork of the +FGo! software written by Robert "erobo" Leda. FFGo is written in Python 3 and +is based on CondConfigParser. diff --git a/games/ffgo/doinst.sh b/games/ffgo/doinst.sh new file mode 100644 index 0000000000000..fecaef1312f42 --- /dev/null +++ b/games/ffgo/doinst.sh @@ -0,0 +1,15 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} + +CONF=/usr/libLIBDIRSUFFIX/pythonPY3VER/site-packages/ffgo/data/config + +for conf in $CONF/*.new ; do + config ${conf} +done diff --git a/games/ffgo/ffgo.SlackBuild b/games/ffgo/ffgo.SlackBuild new file mode 100644 index 0000000000000..1cff7b6e9cd74 --- /dev/null +++ b/games/ffgo/ffgo.SlackBuild @@ -0,0 +1,99 @@ +#!/bin/sh + +# Slackware build script for ffgo + +# Copyright 2017 Philip Lacroix <slackph at posteo dot de> +# 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. + +PRGNAM=ffgo +SRCNAM=FFGo +VERSION=${VERSION:-1.12.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=${PKG:-$TMP/package-$PRGNAM} +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvzf $CWD/$SRCNAM-$VERSION.tar.gz + +cd $SRCNAM-$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 600 -o -perm 444 -o -perm 440 \ + -o -perm 400 \) -exec chmod 644 {} \; + +python3 setup.py install --root=$PKG + +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 + +# Grab Python 3 version. +PY3VER=$(python3 --version | sed -e "s~.*\(3\.[0-9]*\).*~\1~") + +PRGETC=$PKG/etc/$PRGNAM +PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +PRGDAT=$PKG/usr/lib${LIBDIRSUFFIX}/python${PY3VER}/site-packages/$PRGNAM/data + +# Install documentation. +mkdir -p $PRGDOC +cp -a COPYING* ChangeLog* README.rst $PRGDOC/ +cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild + +# Manage config and presets files. +mkdir -p $PRGETC +ln -sf ${PRGDAT#$PKG}/config $PRGETC/config +for conf in $PRGDAT/config/* ; do + mv ${conf} ${conf}.new +done + +mkdir $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +# Tweak config path in doinst.sh. +sed -i "s~LIBDIRSUFFIX~${LIBDIRSUFFIX}~" $PKG/install/doinst.sh +sed -i "s~PY3VER~${PY3VER}~" $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/ffgo/ffgo.info b/games/ffgo/ffgo.info new file mode 100644 index 0000000000000..02bb9211036c8 --- /dev/null +++ b/games/ffgo/ffgo.info @@ -0,0 +1,10 @@ +PRGNAM="ffgo" +VERSION="1.12.3" +HOMEPAGE="http://frougon.net/projects/FFGo" +DOWNLOAD="http://frougon.net/projects/FFGo/dist/1.12.3/FFGo-1.12.3.tar.gz" +MD5SUM="ab67e2e83d8829d3f86be907285718c0" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="FlightGear CondConfigParser python3-pillow" +MAINTAINER="Philip Lacroix" +EMAIL="slackph at posteo dot de" diff --git a/games/ffgo/slack-desc b/games/ffgo/slack-desc new file mode 100644 index 0000000000000..331cc4210e648 --- /dev/null +++ b/games/ffgo/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +ffgo: ffGo (graphical launcher for FlightGear) +ffgo: +ffgo: FFGo is a graphical launcher for FlightGear, i.e. a program whose +ffgo: purpose is to allow an easy assembling and running of a fgfs command +ffgo: line. It is a fork of the FGo! software written by Robert "erobo" +ffgo: Leda. FFGo is written in Python 3 and is based on CondConfigParser. +ffgo: +ffgo: Homepage: http://frougon.net/projects/FFGo +ffgo: +ffgo: +ffgo: |