summaryrefslogtreecommitdiffstats
path: root/games/micropolis/micropolis.SlackBuild
diff options
context:
space:
mode:
author B. Watson2010-04-20 06:19:16 +0200
committer Robby Workman2010-05-15 10:38:33 +0200
commit376ce3db3fd7c6e65981ee59e64b5ee1af6ce5bd (patch)
treeaed78cd3b7f839895f1b07657e4c7c7d7d0664a0 /games/micropolis/micropolis.SlackBuild
parentb43beb7ec043a2db56c6ff0e163e80374a4d2c12 (diff)
downloadslackbuilds-376ce3db3fd7c6e65981ee59e64b5ee1af6ce5bd.tar.gz
games/micropolis: Updated for version 20100418.
Diffstat (limited to 'games/micropolis/micropolis.SlackBuild')
-rw-r--r--games/micropolis/micropolis.SlackBuild42
1 files changed, 22 insertions, 20 deletions
diff --git a/games/micropolis/micropolis.SlackBuild b/games/micropolis/micropolis.SlackBuild
index 0328097cf4..97859f7443 100644
--- a/games/micropolis/micropolis.SlackBuild
+++ b/games/micropolis/micropolis.SlackBuild
@@ -2,6 +2,9 @@
# Slackware build script for Micropolis
+# 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>
# All rights reserved.
#
@@ -23,9 +26,9 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=micropolis
-VERSION=20080222
+VERSION=20100418
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -44,14 +47,17 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
-set -e # Exit on most errors
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
+rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM
chown -R root:root .
@@ -61,27 +67,23 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Force our CFLAGS
+find . -iname \*makefile\* -o -iname \*.mk \
+ | xargs sed -i -e '/FLAG/s/-O[^ ]*/$(SLKCFLAGS) /'
+
# 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 PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION SLKCFLAGS="$SLKCFLAGS"
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 || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null
-)
-
-( 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
-)
+# 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