diff options
author | Philip Lacroix <philnx@posteo.de> | 2014-03-14 16:32:47 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-03-21 13:01:15 -0500 |
commit | 9b10df2f47d271864756879f696846e7d08e3485 (patch) | |
tree | 1d4b1f971dd82850744bf218bf1798a48aee3207 | |
parent | a40ab1a2ef2bb7fda01fa77e27b454c52db51571 (diff) |
games/fgo: Script cleanups.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | games/fgo/CHANGELOG | 11 | ||||
-rw-r--r-- | games/fgo/README | 6 | ||||
-rw-r--r-- | games/fgo/doinst.sh | 9 | ||||
-rw-r--r-- | games/fgo/fgo.SlackBuild | 56 | ||||
-rw-r--r-- | games/fgo/fgo.info | 2 | ||||
-rw-r--r-- | games/fgo/fgo.presets | 3 | ||||
-rw-r--r-- | games/fgo/slack-desc | 2 |
7 files changed, 46 insertions, 43 deletions
diff --git a/games/fgo/CHANGELOG b/games/fgo/CHANGELOG index e21f1ad0fe70..e9d2134fa1a2 100644 --- a/games/fgo/CHANGELOG +++ b/games/fgo/CHANGELOG @@ -1,7 +1,12 @@ -Changes to this SlackBuild since previous FGo! version (1.4.5) +Changes to this SlackBuild since FGo! 1.4.5 +------------------------------------------- -- Script modified according to new icon names and path. If you are building +* Script modified according to new icon names and paths. If you are building a package for a version of FGo! older than 1.5.0, icons will not be linked correctly: in that case please modify this script accordingly, or use its previous version, or (recommended) download the latest FGo! release. -- Removed "presets", as they aren't included in the upstream package anyway. + +* Removed presets for default FlightGear paths, as they are not included in + the upstream package anyway. + +* 1.5.1, build 2: revision and cleanup. diff --git a/games/fgo/README b/games/fgo/README index aa49fe430981..7c2cadb3ac41 100644 --- a/games/fgo/README +++ b/games/fgo/README @@ -5,5 +5,7 @@ and scenario, with a text window which provides a way to specify more advanced command-line options that will be passed to FlightGear. These features allow FGo! to keep a simple, yet powerful design. -NOTE: If you intend to use this SlackBuild for a version of FGo! older -than 1.5.0, please read the CHANGELOG file included in this package.
\ No newline at end of file +NOTE: FGo! versions equal or greater than 1.5.0 are compatible with +FlightGear 3.0 and its new apt.dat database format. If you intend to use +this SlackBuild for a version of FGo! older than 1.5.0, please read the +CHANGELOG file included in this package. diff --git a/games/fgo/doinst.sh b/games/fgo/doinst.sh index 9204f9027b9f..ef3899e8dd78 100644 --- a/games/fgo/doinst.sh +++ b/games/fgo/doinst.sh @@ -1,21 +1,16 @@ config() { NEW="$1" OLD="$(dirname $NEW)/$(basename $NEW .new)" - # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then - # toss the redundant copy rm $NEW fi - # Otherwise, we leave the .new copy for the admin to consider... } -CONFIG=${CONFIG:-/opt/fgo/data/config} -for lang in de en es fr it pl ; do - config $CONFIG/config_${lang}.new +for conf in /opt/fgo/data/config/* ; do + config ${conf} done -config $CONFIG/presets.new if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 diff --git a/games/fgo/fgo.SlackBuild b/games/fgo/fgo.SlackBuild index 03e794b1048d..9f4b5d61d9e9 100644 --- a/games/fgo/fgo.SlackBuild +++ b/games/fgo/fgo.SlackBuild @@ -1,8 +1,8 @@ #!/bin/sh -# Slackware build script for FGo! +# Slackware build script for fgo! -# Copyright 2013-2014 Philip Lacroix <philnx at bluebottle dot com> +# Copyright 2013-2014 Philip Lacroix <philnx at posteo dot de> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,9 +22,11 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +## Build 2: revision and cleanup. + PRGNAM=fgo VERSION=${VERSION:-1.5.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -56,47 +58,49 @@ 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 {} \; -PRGDIR=${PRGDIR:-$PKG/opt/$PRGNAM} -PRGSHR=${PRGSHR:-$PKG/usr/share} -PRGDOC=${PRGDOC:-$PKG/usr/doc/$PRGNAM-$VERSION} -PRGETC=${PRGETC:-$PKG/etc/$PRGNAM} +PRGDIR=$PKG/opt/$PRGNAM +PRGDAT=$PKG/opt/$PRGNAM/data +PRGSHR=$PKG/usr/share +PRGETC=$PKG/etc/$PRGNAM +PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +# Copy files to destination. mkdir -p $PRGDIR -cp -a * $PRGDIR +cp -a * $PRGDIR/ -# Symlink to executable +# Set permissions of the executable file; create symlink. mkdir -p $PKG/usr/bin +chmod 755 $PRGDIR/$PRGNAM ln -sf /opt/$PRGNAM/$PRGNAM $PKG/usr/bin/ -# Desktop entry -mkdir -p $PRGSHR/applications/ +# Create entry for desktop menu. +mkdir -p $PRGSHR/applications cat $CWD/$PRGNAM.desktop > $PRGSHR/applications/$PRGNAM.desktop -# Symlinks to icons -for size in 16x16 24x24 32x32 48x48 64x64 128x128 256x256 scalable -do +# Create symlinks to icons. +for size in 16x16 24x24 32x32 48x48 64x64 128x128 256x256 scalable ; do if [ "${size}" != "scalable" ]; then EX=png ; else EX=svg ; fi mkdir -p $PRGSHR/icons/hicolor/${size}/apps ln -sf /opt/$PRGNAM/data/pics/icons/${size}/$PRGNAM.$EX \ - $PRGSHR/icons/hicolor/${size}/apps/ + $PRGSHR/icons/hicolor/${size}/apps/ done -# Copy documentation, replace broken symlinks +# Copy documentation, replace broken symlinks. mkdir -p $PRGDOC -cp -a $PRGDIR/docs/* $PRGDOC -rm -f $PRGDOC/README/* -cp -a $PRGDIR/data/help/* $PRGDOC/README/ +cp -a $PRGDIR/docs/* $PRGDOC/ +cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild +for lang in de en es fr it pl ; do + ln -sf /opt/$PRGNAM/data/help/help_${lang} $PRGDOC/README/README_${lang} +done -# Symlink to config directory +# Create symlink to config directory. mkdir -p $PRGETC -ln -sf /opt/$PRGNAM/data/config $PRGETC +ln -sf /opt/$PRGNAM/data/config $PRGETC/ -# Don't clobber config files -CONFIG=${CONFIG:-$PRGDIR/data/config} -for lang in de en es fr it pl ; do - mv $CONFIG/config_${lang} $CONFIG/config_${lang}.new +# Don't clobber config files. +for conf in $PRGDAT/config/* ; do + mv ${conf} ${conf}.new done -mv $CONFIG/presets $CONFIG/presets.new mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/games/fgo/fgo.info b/games/fgo/fgo.info index 730433bd3c73..22e5146299da 100644 --- a/games/fgo/fgo.info +++ b/games/fgo/fgo.info @@ -7,4 +7,4 @@ DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="FlightGear" MAINTAINER="Philip Lacroix" -EMAIL="philnx at bluebottle dot com" +EMAIL="philnx at posteo dot de" diff --git a/games/fgo/fgo.presets b/games/fgo/fgo.presets deleted file mode 100644 index 80fdd353eef9..000000000000 --- a/games/fgo/fgo.presets +++ /dev/null @@ -1,3 +0,0 @@ -FG_BIN=/usr/bin/fgfs ---fg-root=/usr/share/FlightGear ---fg-scenery=/usr/share/FlightGear/Scenery diff --git a/games/fgo/slack-desc b/games/fgo/slack-desc index 1706475fc792..2b315c0fb90c 100644 --- a/games/fgo/slack-desc +++ b/games/fgo/slack-desc @@ -15,5 +15,5 @@ fgo: and scenario, with a text window which provides a way to specify more fgo: advanced command-line options that will be passed to FlightGear. These fgo: features allow FGo! to keep a simple, yet powerful design. fgo: -fgo: Homepage: fgo: http://sites.google.com/site/erobosprojects/flightgear/add-ons/fgo +fgo: |