games/openttd: Updated for version 0.7.0

This commit is contained in:
Chess Griffin 2010-05-12 17:39:26 +02:00 committed by David Somero
parent b1a3a536e7
commit 7a9ca4915b
5 changed files with 49 additions and 31 deletions

View File

@ -1,8 +1,14 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications
/usr/bin/update-desktop-database -q 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
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View File

@ -2,12 +2,30 @@
# Slackware build script for OpenTTD
# Written by Chess Griffin <chess@chessgriffin.com>
# Copyright 2007-2009 Chess Griffin <chess@chessgriffin.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=openttd
VERSION=0.6.3
VERSION=${VERSION:-0.7.0}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@ -15,14 +33,15 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="COPYING changelog.txt known-bugs.txt readme.txt docs/*"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
fi
set -e # Exit on most errors
@ -47,6 +66,8 @@ CXXFLAGS="$SLKCFLAGS" \
--binary-dir=/games \
--data-dir=/share/games/openttd \
--icon-dir=/share/pixmaps \
--man-dir=/man/man6 \
--doc-dir=/doc/$PRGNAM-$VERSION \
--personal-dir=.openttd \
--install-dir=$PKG
@ -54,21 +75,22 @@ make
make install 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
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
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
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
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

View File

@ -1,10 +0,0 @@
[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

@ -1,8 +1,8 @@
PRGNAM="openttd"
VERSION="0.6.3"
VERSION="0.7.0"
HOMEPAGE="http://www.openttd.org"
DOWNLOAD="http://downloads.sourceforge.net/openttd/openttd-0.6.3-source.tar.bz2"
MD5SUM="d05b9ebf67c83f07e8286d0d2b1fc293"
DOWNLOAD="http://downloads.sourceforge.net/openttd/openttd-0.7.0-source.tar.bz2"
MD5SUM="3185dccdb094ada9a1f3f610965c15bc"
MAINTAINER="Chess Griffin"
EMAIL="chess@chessgriffin.com"
APPROVED="Erik Hanson"
APPROVED="dsomero"

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