aboutsummaryrefslogtreecommitdiff
path: root/games/fgo/fgo.SlackBuild
diff options
context:
space:
mode:
authorPhilip Lacroix <philnx@posteo.de>2014-03-14 16:32:47 +0700
committerErik Hanson <erik@slackbuilds.org>2014-03-21 13:01:15 -0500
commit9b10df2f47d271864756879f696846e7d08e3485 (patch)
tree1d4b1f971dd82850744bf218bf1798a48aee3207 /games/fgo/fgo.SlackBuild
parenta40ab1a2ef2bb7fda01fa77e27b454c52db51571 (diff)
games/fgo: Script cleanups.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/fgo/fgo.SlackBuild')
-rw-r--r--games/fgo/fgo.SlackBuild56
1 files changed, 30 insertions, 26 deletions
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