diff options
Diffstat (limited to 'games/fgo/fgo.SlackBuild')
-rw-r--r-- | games/fgo/fgo.SlackBuild | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/games/fgo/fgo.SlackBuild b/games/fgo/fgo.SlackBuild index 03e794b104..9f4b5d61d9 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 |