games/openttd: Updated for version 1.2.0.

An update was submitted by "Janis Eisaks" EMAIL="jancs@dv.lv"
  with Chess giving permission to take over, but Chess was not
  the current maintainer. I bumped the version cleaned up the
  build a bit and will see who wants to maintain this.

Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
dsomero 2012-05-01 11:50:38 -04:00 committed by Erik Hanson
parent fb847ec10e
commit 3ea96c4c05
3 changed files with 36 additions and 36 deletions

View file

@ -23,16 +23,18 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=openttd
VERSION=${VERSION:-1.1.2}
VERSION=${VERSION:-1.2.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
OPENGFX=0.4.4
OPENSFX=0.2.3
OPENMSX=0.3.1
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@ -63,20 +65,19 @@ else
LIBDIRSUFFIX=""
fi
set -e # Exit on most errors
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION-source.tar.gz
if [ "$OPENDATA" == "YES" ]; then
rm -rf opengfx-0.3.5 opensfx-0.2.3 openmsx-0.3.1
unzip -o $CWD/opengfx-0.3.5-all.zip
unzip -o $CWD/opensfx-0.2.3-all.zip
unzip -o $CWD/openmsx-0.3.1-all.zip
fi
tar xvf $CWD/$PRGNAM-$VERSION-source.tar.xz
cd $PRGNAM-$VERSION
if [ "$OPENDATA" == "YES" ]; then
unzip -o $CWD/opengfx-$OPENGFX-all.zip
unzip -o $CWD/opensfx-$OPENSFX-all.zip
unzip -o $CWD/openmsx-$OPENMSX-all.zip
fi
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@ -99,6 +100,20 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DEST_DIR=$PKG
# 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 opengfx-$OPENGFX/*
rename .txt -opensfx.txt opensfx-$OPENSFX/*
rename .txt -openmsx.txt openmsx-$OPENMSX/*
# Now copy the data files
mkdir $PKG/usr/share/games/openttd/data/
mkdir $PKG/usr/share/games/openttd/gm/
cp -a opengfx-$OPENGFX/* $PKG/usr/share/games/openttd/data/
cp -a opensfx-$OPENSFX/* $PKG/usr/share/games/openttd/data/
cp -a openmsx-$OPENMSX/* $PKG/usr/share/games/openttd/gm/
fi
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@ -110,21 +125,6 @@ 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.3.5/*
rename .txt -opensfx.txt $TMP/opensfx-0.2.3/*
rename .txt -openmsx.txt $TMP/openmsx-0.3.1/*
# Now copy the data files
cp -a $TMP/opengfx-0.3.5/* $PKG/usr/share/games/openttd/data/
cp -a $TMP/opensfx-0.2.3/* $PKG/usr/share/games/openttd/data/
cp -a $TMP/openmsx-0.3.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

View file

@ -1,14 +1,14 @@
PRGNAM="openttd"
VERSION="1.1.2"
VERSION="1.2.0"
HOMEPAGE="http://www.openttd.org"
DOWNLOAD="http://binaries.openttd.org/releases/1.1.2/openttd-1.1.2-source.tar.gz \
http://binaries.openttd.org/extra/opengfx/0.3.5/opengfx-0.3.5-all.zip \
http://binaries.openttd.org/extra/opensfx/0.2.3/opensfx-0.2.3-all.zip \
http://binaries.openttd.org/extra/openmsx/0.3.1/openmsx-0.3.1-all.zip"
MD5SUM="1bcce1ecbf2fba621a8128bbb470288f \
080084f375b9662e5c4a91a2cec3cb73 \
3605b82f24153500c8a1804e4420168a \
858b79d44aea6de5e15d9d1439e86cc3"
DOWNLOAD="http://binaries.openttd.org/releases/1.2.0/openttd-1.2.0-source.tar.xz \
http://binaries.openttd.org/extra/opengfx/0.4.4/opengfx-0.4.4-all.zip \
http://binaries.openttd.org/extra/openmsx/0.3.1/openmsx-0.3.1-all.zip \
http://binaries.openttd.org/extra/opensfx/0.2.3/opensfx-0.2.3-all.zip"
MD5SUM="7f5181fdd5119336ccbe08f47eab78c1 \
0e5e4ac8fe21d866012dcbd0a976b25f \
858b79d44aea6de5e15d9d1439e86cc3 \
3605b82f24153500c8a1804e4420168a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="LEVAI Daniel"

View file

@ -5,7 +5,7 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler-------------------------------------------------------|
|-----handy-ruler------------------------------------------------------|
openttd: OpenTTD (open-source clone of Transport Tycoon Deluxe)
openttd:
openttd: OpenTTD is a clone of the Microprose game "Transport Tycoon