diff options
-rw-r--r-- | games/openttd/doinst.sh | 10 | ||||
-rw-r--r-- | games/openttd/openttd.SlackBuild | 50 | ||||
-rw-r--r-- | games/openttd/openttd.desktop | 10 | ||||
-rw-r--r-- | games/openttd/openttd.info | 8 | ||||
-rw-r--r-- | games/openttd/slack-desc | 2 |
5 files changed, 49 insertions, 31 deletions
diff --git a/games/openttd/doinst.sh b/games/openttd/doinst.sh index 1be07cc6d6..9830478e8c 100644 --- a/games/openttd/doinst.sh +++ b/games/openttd/doinst.sh @@ -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 + diff --git a/games/openttd/openttd.SlackBuild b/games/openttd/openttd.SlackBuild index d6496e8e5c..5626f983b8 100644 --- a/games/openttd/openttd.SlackBuild +++ b/games/openttd/openttd.SlackBuild @@ -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 diff --git a/games/openttd/openttd.desktop b/games/openttd/openttd.desktop deleted file mode 100644 index 00c1560519..0000000000 --- a/games/openttd/openttd.desktop +++ /dev/null @@ -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 diff --git a/games/openttd/openttd.info b/games/openttd/openttd.info index 8e50f2c827..fb5b60d37e 100644 --- a/games/openttd/openttd.info +++ b/games/openttd/openttd.info @@ -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" diff --git a/games/openttd/slack-desc b/games/openttd/slack-desc index 416732a6ab..93e05f4fb3 100644 --- a/games/openttd/slack-desc +++ b/games/openttd/slack-desc @@ -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 |