games/fgo: Script cleanups.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
a40ab1a2ef
commit
9b10df2f47
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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/
|
||||
|
||||
# Symlink to config directory
|
||||
mkdir -p $PRGETC
|
||||
ln -sf /opt/$PRGNAM/data/config $PRGETC
|
||||
|
||||
# Don't clobber config files
|
||||
CONFIG=${CONFIG:-$PRGDIR/data/config}
|
||||
cp -a $PRGDIR/docs/* $PRGDOC/
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild
|
||||
for lang in de en es fr it pl ; do
|
||||
mv $CONFIG/config_${lang} $CONFIG/config_${lang}.new
|
||||
ln -sf /opt/$PRGNAM/data/help/help_${lang} $PRGDOC/README/README_${lang}
|
||||
done
|
||||
|
||||
# Create symlink to config directory.
|
||||
mkdir -p $PRGETC
|
||||
ln -sf /opt/$PRGNAM/data/config $PRGETC/
|
||||
|
||||
# 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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
FG_BIN=/usr/bin/fgfs
|
||||
--fg-root=/usr/share/FlightGear
|
||||
--fg-scenery=/usr/share/FlightGear/Scenery
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue