games/frogatto: SlackBuild updates, install to /opt.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
wru 2016-11-26 15:12:01 +00:00 committed by Willy Sudiarto Raharjo
parent 12692fe3ce
commit b99b64f336
No known key found for this signature in database
GPG key ID: 887B8374D7333381
4 changed files with 30 additions and 31 deletions

View file

@ -2,7 +2,7 @@
# Slackware build script for frogatto
# Copyright <2013> <wru> <gnuandpenguinos@gmail.com>
# Copyright 2016 wru <gnuandpenguinos@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -24,12 +24,12 @@
PRGNAM=frogatto
VERSION=${VERSION:-1.3.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@ -54,39 +54,42 @@ else
LIBDIRSUFFIX=""
fi
set -eu
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || tar xvf $CWD/$VERSION.tar.?z*
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$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 {} \;
# Fix locale file path
sed -i 's!"./locale/"!"/usr/share/locale/"!' src/i18n.cpp
\( -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 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix linking with boost libs
sed -i 's,-mt,,g' Makefile
make \
CC=gcc \
OPTIMIZE=no \
USE_CCACHE=no \
CXX=g++ \
OPT="$SLKCFLAGS -fgnu89-inline" \
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" || exit 1
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}"
mkdir -p $PKG/usr/libexec/frogatto
mv game $PKG/usr/libexec/frogatto
mkdir -p $PKG/opt/frogatto/modules/frogatto
mv game data images music bar-descriptor.xml master-config.cfg surface_scaling.cfg cellular civ ct rpg \
DejaVuSans.ttf FreeMono.ttf UbuntuMono-B.ttf UbuntuMono-BI.ttf UbuntuMono-R.ttf UbuntuMono-RI.ttf \
$PKG/opt/frogatto
mv modules/frogatto/{data,images,locale,music,sounds,module.cfg} \
$PKG/opt/frogatto/modules/frogatto
mv modules/{aritest,cellular,cube_trains,duxduo,elisa,hex,rpg,secluded-isle,stellar_limit,tictactoe,tileciv,vgi,weregild,wip_levels} \
$PKG/opt/frogatto/modules
mkdir -p $PKG/usr/share/frogatto
mv modules/frogatto/{data,images,music,sounds} $PKG/usr/share/frogatto
mv modules/frogatto/locale $PKG/usr/share
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
mkdir -p $PKG/usr/bin
cat $CWD/frogatto.wrapper > $PKG/usr/bin/frogatto
@ -102,15 +105,11 @@ pod2man --section=6 \
-date="July 13th, 2010" \
$CWD/$PRGNAM.pod > $PKG/usr/man/man6/$PRGNAM.6
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
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
FONT_GENERATION INSTALL LICENSE modules/frogatto/CHANGELOG \
INSTALL LICENSE README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

View file

@ -4,4 +4,4 @@ Name=frogatto
Comment=2D platform game starring a quixotic frog
Categories=Game;
Exec=/usr/bin/frogatto
Icon=/usr/share/frogatto/images/window-icon.png
Icon=/opt/frogatto/modules/frogatto/images/window-icon.png

View file

@ -1,7 +1,7 @@
PRGNAM="frogatto"
VERSION="1.3.1"
HOMEPAGE="http://www.frogatto.com/"
DOWNLOAD="https://github.com/frogatto/frogatto/archive/1.3.1.tar.gz"
DOWNLOAD="https://github.com/frogatto/frogatto/archive/1.3.1/frogatto-1.3.1.tar.gz"
MD5SUM="f3206fbe1395ea2878092fbd4ed2c591"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""

View file

@ -1,3 +1,3 @@
#!/bin/sh
cd /usr/share/frogatto
exec /usr/libexec/frogatto/game "$@"
cd /opt/frogatto
exec /opt/frogatto/game "$@"