From f081a0df5d890cf3f0778bfd28c74c2b0d74667f Mon Sep 17 00:00:00 2001 From: Chess Griffin Date: Wed, 21 Apr 2010 21:32:01 -0500 Subject: games/openttd: Updated for version 1.0.0. Can now use open source graphics, sounds, and music. Thanks to Chess Griffin. --- games/openttd/openttd.SlackBuild | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'games/openttd/openttd.SlackBuild') diff --git a/games/openttd/openttd.SlackBuild b/games/openttd/openttd.SlackBuild index ff1199e7c87f..94f9a2c32180 100644 --- a/games/openttd/openttd.SlackBuild +++ b/games/openttd/openttd.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for OpenTTD -# Copyright 2007-2009 Chess Griffin +# Copyright 2007-2010 Chess Griffin # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,9 +23,9 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=openttd -VERSION=${VERSION:-0.7.0} +VERSION=${VERSION:-1.0.0} ARCH=${ARCH:-i486} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -33,6 +33,13 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +# If you want the script to use the open source graphics, sound, and music +# data files (instead of the original Windows files), keep OPENDATA set to +# YES. Otherwise, changing it to NO will not include the open source +# graphics, sound, and music data files and you will need to manually copy +# over the original Windows data files in order for OpenTTD to run. +OPENDATA=${OPENDATA:-YES} + if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" @@ -51,6 +58,12 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION-source.tar.bz2 +if [ "$OPENDATA" == "YES" ]; then + rm -rf opengfx-0.2.3 opensfx-0.2.3 openmsx-0.2.1 + unzip -o $CWD/opengfx-0.2.3-all.zip + unzip -o $CWD/opensfx-0.2.3-all.zip + unzip -o $CWD/openmsx-0.2.1-all.zip +fi cd $PRGNAM-$VERSION chown -R root:root . find . \ @@ -78,7 +91,7 @@ make install DEST_DIR=$PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ xargs strip --strip-unneeded 2> /dev/null || true find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null + xargs strip --strip-unneeded 2> /dev/null || true ) ( cd $PKG/usr/man @@ -91,6 +104,21 @@ cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION rm -f $PKG/usr/doc/$PRGNAM-$VERSION/openttd.6 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +# Copy opengfx, opensfx, and openmsx files if OPENDATA=YES +if [ "$OPENDATA" == "YES" ]; then + # First rename some text files to avoid name collisions when copied + rename .txt -opengfx.txt $TMP/opengfx-0.2.3/* + rename .txt -opensfx.txt $TMP/opensfx-0.2.3/* + rename .txt -openmsx.txt $TMP/openmsx-0.2.1/* + # Now copy the data files + cp -a $TMP/opengfx-0.2.3/* $PKG/usr/share/games/openttd/data/ + cp -a $TMP/opensfx-0.2.3/* $PKG/usr/share/games/openttd/data/ + cp -a $TMP/openmsx-0.2.1/* $PKG/usr/share/games/openttd/gm/ + # These perms are needed + chmod 0644 $PKG/usr/share/games/openttd/data/* + chmod 0644 $PKG/usr/share/games/openttd/gm/* +fi + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh -- cgit v1.2.3