summaryrefslogtreecommitdiffstats
path: root/games/micropolis
diff options
context:
space:
mode:
author B. Watson2021-10-22 20:15:10 +0200
committer Willy Sudiarto Raharjo2021-10-29 12:07:22 +0200
commit812cfa11dd4f46409a1e3ff8a1860e1049734834 (patch)
tree31c7e8a93d682e32042ea838f703568347d75610 /games/micropolis
parent38a4d306e759c14babb0a31893f5ca1c70fcb8b3 (diff)
downloadslackbuilds-812cfa11dd4f46409a1e3ff8a1860e1049734834.tar.gz
games/micropolis: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/micropolis')
-rw-r--r--games/micropolis/README20
-rw-r--r--games/micropolis/micropolis.SlackBuild66
-rw-r--r--games/micropolis/micropolis.info2
-rw-r--r--games/micropolis/micropolis.pngbin0 -> 14761 bytes
-rw-r--r--games/micropolis/slack-desc2
5 files changed, 57 insertions, 33 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/micropolis.SlackBuild b/games/micropolis/micropolis.SlackBuild
index 06b5dfa4bf..8c05a6f5e5 100644
--- a/games/micropolis/micropolis.SlackBuild
+++ b/games/micropolis/micropolis.SlackBuild
@@ -5,7 +5,7 @@
# Now maintained by B. Watson <yalhcru@gmail.com>, 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,11 +25,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20211022 bkw: BUILD=4, new-style icons.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=micropolis
VERSION=${VERSION:-20100418}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -41,9 +43,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -54,6 +53,8 @@ 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"
@@ -75,11 +76,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 \
@@ -88,20 +86,44 @@ 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 -DTCL_IEEE_FP_MATH"
-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
-
-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
+sed -i -e '/^Encoding/d' \
+ -e 's/\.png$//' \
+ -e '/^Exec=/s,=,=/usr/games/,' \
+ $PKG/usr/share/applications/$PRGNAM.desktop
+
+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
diff --git a/games/micropolis/micropolis.info b/games/micropolis/micropolis.info
index 47fdb36cae..dd4282ae9f 100644
--- a/games/micropolis/micropolis.info
+++ b/games/micropolis/micropolis.info
@@ -1,6 +1,6 @@
PRGNAM="micropolis"
VERSION="20100418"
-HOMEPAGE="http://www.donhopkins.com/home/micropolis"
+HOMEPAGE="https://www.donhopkins.com/home/micropolis/"
DOWNLOAD="https://slackware.uk/~urchlay/src/micropolis-20100418.tar.bz2"
MD5SUM="df7b073133991bd1a9b04db60b2ca8a7"
DOWNLOAD_x86_64=""
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