summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChess Griffin <chess@chessgriffin.com>2010-05-11 20:00:34 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 20:00:34 +0200
commit7539f81c522bd356a6050831fb806830011d1ab2 (patch)
tree130ed661eb3614e15c20180a389ad182e362b612
parent8d943b6c0e461c8f72db010f4a7d7cbaa4a16166 (diff)
downloadslackbuilds-7539f81c522bd356a6050831fb806830011d1ab2.tar.gz
games/openttd: Added to 12.0 repository
-rw-r--r--games/openttd/README13
-rw-r--r--games/openttd/doinst.sh8
-rw-r--r--games/openttd/openttd.SlackBuild77
-rw-r--r--games/openttd/openttd.desktop10
-rw-r--r--games/openttd/openttd.info8
-rw-r--r--games/openttd/slack-desc19
6 files changed, 135 insertions, 0 deletions
diff --git a/games/openttd/README b/games/openttd/README
new file mode 100644
index 0000000000..3239d933d8
--- /dev/null
+++ b/games/openttd/README
@@ -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.
diff --git a/games/openttd/doinst.sh b/games/openttd/doinst.sh
new file mode 100644
index 0000000000..474753e464
--- /dev/null
+++ b/games/openttd/doinst.sh
@@ -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
diff --git a/games/openttd/openttd.SlackBuild b/games/openttd/openttd.SlackBuild
new file mode 100644
index 0000000000..15323f40c1
--- /dev/null
+++ b/games/openttd/openttd.SlackBuild
@@ -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
diff --git a/games/openttd/openttd.desktop b/games/openttd/openttd.desktop
new file mode 100644
index 0000000000..00c1560519
--- /dev/null
+++ b/games/openttd/openttd.desktop
@@ -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
diff --git a/games/openttd/openttd.info b/games/openttd/openttd.info
new file mode 100644
index 0000000000..8d5ae6a245
--- /dev/null
+++ b/games/openttd/openttd.info
@@ -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" \ No newline at end of file
diff --git a/games/openttd/slack-desc b/games/openttd/slack-desc
new file mode 100644
index 0000000000..43efb9d6c3
--- /dev/null
+++ b/games/openttd/slack-desc
@@ -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: