summaryrefslogtreecommitdiff
path: root/games/openttd/openttd.SlackBuild
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2012-05-01 11:50:38 -0400
committerErik Hanson <erik@slackbuilds.org>2012-05-07 12:18:05 -0500
commit3ea96c4c055a118455e89d776a8c5f41818ffa8f (patch)
tree03276fd12aa396462cfcc378dcb6eedfedced643 /games/openttd/openttd.SlackBuild
parentfb847ec10e09f0772e317aef13db51baaf8447e2 (diff)
downloadslackbuilds-3ea96c4c055a118455e89d776a8c5f41818ffa8f.tar.gz
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>
Diffstat (limited to 'games/openttd/openttd.SlackBuild')
-rw-r--r--games/openttd/openttd.SlackBuild50
1 files changed, 25 insertions, 25 deletions
diff --git a/games/openttd/openttd.SlackBuild b/games/openttd/openttd.SlackBuild
index 92fea81076..6fffcd13c0 100644
--- a/games/openttd/openttd.SlackBuild
+++ b/games/openttd/openttd.SlackBuild
@@ -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
+tar xvf $CWD/$PRGNAM-$VERSION-source.tar.xz
+cd $PRGNAM-$VERSION
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
+ unzip -o $CWD/opengfx-$OPENGFX-all.zip
+ unzip -o $CWD/opensfx-$OPENSFX-all.zip
+ unzip -o $CWD/openmsx-$OPENMSX-all.zip
fi
-cd $PRGNAM-$VERSION
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