summaryrefslogtreecommitdiffstats
path: root/games/micropolis
diff options
context:
space:
mode:
Diffstat (limited to 'games/micropolis')
-rw-r--r--games/micropolis/README20
-rw-r--r--games/micropolis/doinst.sh5
-rw-r--r--games/micropolis/micropolis.SlackBuild77
-rw-r--r--games/micropolis/micropolis.info6
-rw-r--r--games/micropolis/micropolis.pngbin0 -> 14761 bytes
-rw-r--r--games/micropolis/slack-desc2
6 files changed, 75 insertions, 35 deletions
diff --git a/games/micropolis/README b/games/micropolis/README
index 0e037e8954..4daf549124 100644
--- a/games/micropolis/README
+++ b/games/micropolis/README
@@ -1,23 +1,25 @@
+micropolis: micropolis (GPL'd original SimCity game)
+
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
+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 2010-04-18 obtained
-from: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/micropolis which is
-a community-maintained version with several important patches and
+NOTE: This SlackBuild is for a git snapshot dated 2010-04-18 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
+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
+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
+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
+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
index e4e6459838..9424ce43ff 100644
--- a/games/micropolis/doinst.sh
+++ b/games/micropolis/doinst.sh
@@ -6,3 +6,8 @@ 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/micropolis/micropolis.SlackBuild b/games/micropolis/micropolis.SlackBuild
index 2f74efd4ae..bd09100122 100644
--- a/games/micropolis/micropolis.SlackBuild
+++ b/games/micropolis/micropolis.SlackBuild
@@ -1,11 +1,11 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Micropolis
-# Now maintained by B. Watson <yalhcru@gmail.com>, please don't bother
+# Now maintained by B. Watson <urchlay@slackware.uk>, please don't bother
# Chess with questions about this build (bother me instead)
-# Copyright 2008-2009 Chess Griffin <chess@chessgriffin.com>
+# Copyright 2008-2009 Chess Griffin <email removed>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,10 +25,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230107 bkw: BUILD=5, fix doinst.sh.
+# 20211022 bkw: BUILD=4, new-style icons.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=micropolis
VERSION=${VERSION:-20100418}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-5}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,12 +44,18 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="COPYING README"
+DOCDIR=/usr/doc/$PRGNAM-$VERSION
+PKGDOC=$PKG/$DOCDIR
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
@@ -65,11 +77,8 @@ rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# Force our CFLAGS
find . -iname \*makefile\* -o -iname \*.mk \
@@ -78,24 +87,48 @@ find . -iname \*makefile\* -o -iname \*.mk \
# comment out the next line to disable the airplane crash disaster
sed -i -e 's/-DNO_AIRCRASH//' src/sim/makefile
-make -j1 PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION SLKCFLAGS="$SLKCFLAGS"
-make -j1 install PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION DESTDIR=$PKG
+run_make() {
+ make -j1 \
+ PREFIX=/usr \
+ DOCDIR=$DOCDIR \
+ DATADIR=/usr/share/games/$PRGNAM \
+ BINDIR=/usr/games \
+ SLKCFLAGS="$SLKCFLAGS -DTCL_IEEE_FP_MATH" \
+ DESTDIR=$PKG \
+ "$@"
+}
+
+# 20211022 bkw: Makefile already strips the one binary (sim).
+run_make
+run_make install
+
+# 20211022 bkw: Upstream's icon is an oddball size: 58x67. This icon
+# was made by cropping the bottom 3 lines from the original, making
+# the grey background color transparent, and centering it in a 64x64
+# canvas.
+for px in 16 32 48 64; do
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ convert -resize $size $CWD/$PRGNAM.png $dir/$PRGNAM.png
+done
+
+rm $PKG/usr/share/pixmaps/*
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
# Make .desktop file pass desktop-file-validate
-sed -i -e \
- '/^Encoding/d' -e 's/\.png$//' \
- $PKG/usr/share/applications/$PRGNAM.desktop
-
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+sed -i -e '/^Encoding/d' \
+ -e 's/\.png$//' \
+ -e '/^Exec=/s,=,=/usr/games/,' \
+ $PKG/usr/share/applications/$PRGNAM.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 $PKGDOC
+cp -a $DOCS $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/micropolis/micropolis.info b/games/micropolis/micropolis.info
index de184ec35c..421105662d 100644
--- a/games/micropolis/micropolis.info
+++ b/games/micropolis/micropolis.info
@@ -1,10 +1,10 @@
PRGNAM="micropolis"
VERSION="20100418"
-HOMEPAGE="http://www.donhopkins.com/home/micropolis"
-DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/micropolis-20100418.tar.bz2"
+HOMEPAGE="https://www.donhopkins.com/home/micropolis/"
+DOWNLOAD="https://slackware.uk/~urchlay/src/micropolis-20100418.tar.bz2"
MD5SUM="df7b073133991bd1a9b04db60b2ca8a7"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
-EMAIL="yalhcru@gmail.com"
+EMAIL="urchlay@slackware.uk"
diff --git a/games/micropolis/micropolis.png b/games/micropolis/micropolis.png
new file mode 100644
index 0000000000..d5f74e56be
--- /dev/null
+++ b/games/micropolis/micropolis.png
Binary files differ
diff --git a/games/micropolis/slack-desc b/games/micropolis/slack-desc
index 1b35835a8e..88551792f0 100644
--- a/games/micropolis/slack-desc
+++ b/games/micropolis/slack-desc
@@ -6,7 +6,7 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-micropolis: micropolis (GPL'd original SimCity)
+micropolis: micropolis (GPL'd original SimCity game)
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