games/openttd: Added to 12.0 repository

This commit is contained in:
Chess Griffin 2010-05-11 20:00:34 +02:00 committed by David Somero
parent 8d943b6c0e
commit 7539f81c52
6 changed files with 135 additions and 0 deletions

13
games/openttd/README Normal file
View File

@ -0,0 +1,13 @@
OpenTTD is a clone of the Microprose game "Transport Tycoon Deluxe,"
a popular game originally written by Chris Sawyer. Significant
enhancements from the original game include bigger maps, new AI,
stable multiplayer mode, dedicated server mode, and many in-game updates.
Several original Windows data files must be copied into the
/usr/share/games/openttd/data directory before the game can be played.
List of the required files:
sample.cat trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf
Again, several original files must be copied from the game cd or equivalent.
See the readme.txt or http://wiki.openttd.org for more information.

8
games/openttd/doinst.sh Normal file
View File

@ -0,0 +1,8 @@
if [ -x usr/bin/update-desktop-database ]; then
./usr/bin/update-desktop-database ./usr/share/applications >/dev/null 2>&1
fi
if [ -x usr/bin/update-mime-database ]; then
./usr/bin/update-mime-database ./usr/share/mime >/dev/null 2>&1
fi

View File

@ -0,0 +1,77 @@
#!/bin/sh
# Slackware build script for OpenTTD
# Written by Chess Griffin <chess@chessgriffin.com>
PRGNAM=openttd
VERSION=0.5.3
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="BUGS COPYING changelog.txt known-bugs.txt readme.txt docs/*"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
set -e # Exit on most errors
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION-source.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
make INSTALL=1 \
PREFIX=/usr \
BINARY_DIR=/games \
DATA_DIR=/share/games/openttd \
ICON_DIR=/share/pixmaps \
PERSONAL_DIR=.openttd \
USE_HOMEDIR=1 \
WITH_ZLIB=1 \
UNIX=1 \
VERBOSE=1
make install INSTALL:=1 DEST_DIR=$PKG
( cd $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
)
install -D -m 0644 $CWD/openttd.desktop \
$PKG/usr/share/applications/openttd.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/usr/man/man6
mv $PKG/usr/doc/$PRGNAM-$VERSION/openttd.6 $PKG/usr/man/man6/openttd.6
gzip -9 $PKG/usr/man/man6/openttd.6
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz

View File

@ -0,0 +1,10 @@
[Desktop Entry]
Name=Openttd
GenericName=Game
Comment="An open source clone of Transport Tycoon Deluxe"
Exec=/usr/games/openttd
Icon=/usr/share/applications/openttd.64.png
Terminal=false
MultipleArgs=false
Type=Application
Categories=Game;Simulation;StrategyGame

View File

@ -0,0 +1,8 @@
PRGNAM="openttd"
VERSION="0.5.3"
HOMEPAGE="http://www.openttd.org"
DOWNLOAD="http://downloads.sourceforge.net/openttd/openttd-0.5.3-source.tar.bz2"
MD5SUM="592c047903a3e7f17f95279f77b8a1dd"
MAINTAINER="Chess Griffin"
EMAIL="chess@chessgriffin.com"
APPROVED="David Somero"

19
games/openttd/slack-desc Normal file
View File

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
openttd: OpenTTD (open-source clone of Transport Tycoon Deluxe)
openttd:
openttd: OpenTTD is a clone of the Microprose game "Transport Tycoon
openttd: Deluxe," a popular game originally written by Chris Sawyer.
openttd: Significant enhancements from the original game include
openttd: bigger maps, new AI, stable multiplayer mode, dedicated
openttd: server mode, and many in-game updates.
openttd:
openttd: Homepage: http://www.openttd.org
openttd:
openttd: