diff options
-rw-r--r-- | games/micropolis/README | 23 | ||||
-rw-r--r-- | games/micropolis/doinst.sh | 8 | ||||
-rw-r--r-- | games/micropolis/micropolis.SlackBuild | 65 | ||||
-rw-r--r-- | games/micropolis/micropolis.info | 8 | ||||
-rw-r--r-- | games/micropolis/slack-desc | 19 |
5 files changed, 123 insertions, 0 deletions
diff --git a/games/micropolis/README b/games/micropolis/README new file mode 100644 index 0000000000000..f91527c7410e8 --- /dev/null +++ b/games/micropolis/README @@ -0,0 +1,23 @@ +Micropolis is a simulation game based on the original source code of +SimCity, donated to the One Laptop Per Child project by Electronic +Arts under the GPL v3. Micropolis is developed by Don Hopkins, one of +the game's original authors. + +NOTES: This SlackBuild is for a git snapshot dated 2008-02-22 obtained +from: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/micropolis which is +a community-maintained version with several important patches and +bugfixes. + +Additionally, please note that the first startup screen may be too +large for monitors with a lower resolution. Unfortunately, this is a +bug that has not been fixed yet. However, by using ALT-left mouse +button, one can move the startup screen around enough to see +everything. Once the game starts, the resolution should scale down +correctly to fit within your monitor. + +Finally, the original source for the OLPC version of this game removed +the airplane crash disaster. This has been added back in to the +community-maintained version from which this package is built, and +this SlackBuild enables it by default. If you wish to disable the +airplane crash disaster, please see the SlackBuild, as there is a line +that can be commented out to disable it. diff --git a/games/micropolis/doinst.sh b/games/micropolis/doinst.sh new file mode 100644 index 0000000000000..474753e464482 --- /dev/null +++ b/games/micropolis/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/micropolis/micropolis.SlackBuild b/games/micropolis/micropolis.SlackBuild new file mode 100644 index 0000000000000..a03f9c2955b79 --- /dev/null +++ b/games/micropolis/micropolis.SlackBuild @@ -0,0 +1,65 @@ +#!/bin/sh + +# Slackware build script for Micropolis + +# Written by Chess Griffin <chess@chessgriffin.com> + +PRGNAM=micropolis +VERSION=20080222 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +DOCS="COPYING README" + +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.tar.bz2 +cd $PRGNAM +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 {} \; + +# comment out the next line to disable the airplane crash disaster +sed -i -e 's/-DNO_AIRCRASH//' src/sim/makefile + +# I don't see an easy way to use custom CFLAGS without extensive patching, +# so we won't. If someone wants to spend some time on a patch for this to +# send upstream, feel free. It shouldn't be too difficult, but I've got +# too many other priorities right now. --rworkman +make PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION +make install PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION DESTDIR=$PKG + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || exit 1 + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +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/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/micropolis/micropolis.info b/games/micropolis/micropolis.info new file mode 100644 index 0000000000000..75868a39928b1 --- /dev/null +++ b/games/micropolis/micropolis.info @@ -0,0 +1,8 @@ +PRGNAM="micropolis" +VERSION="20080222" +HOMEPAGE="http://www.donhopkins.com/home/micropolis" +DOWNLOAD="http://slackbuilds.org/sources/12.0/micropolis-20080222.tar.bz2" +MD5SUM="4731f0f039e6dbc51ade49b00a52e9a5" +MAINTAINER="Chess Griffin" +EMAIL="chess@chessgriffin.com" +APPROVED="rworkman" diff --git a/games/micropolis/slack-desc b/games/micropolis/slack-desc new file mode 100644 index 0000000000000..0538a531a94aa --- /dev/null +++ b/games/micropolis/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---------------------------------------------------| +micropolis: Micropolis (GPL'd original SimCity) +micropolis: +micropolis: Micropolis is a simulation game based on the original source code +micropolis: of SimCity, donated to the One Laptop Per Child (OLPC) project by +micropolis: Electronic Arts under the GPL v3. +micropolis: +micropolis: Micropolis is developed by Don Hopkins, one of the game's +micropolis: original authors. +micropolis: +micropolis: http://www.donhopkins.com/home/micropolis +micropolis: |