summaryrefslogtreecommitdiffstats
path: root/games/mininim/mininim.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/mininim/mininim.SlackBuild')
-rw-r--r--games/mininim/mininim.SlackBuild49
1 files changed, 42 insertions, 7 deletions
diff --git a/games/mininim/mininim.SlackBuild b/games/mininim/mininim.SlackBuild
index 0a1bc046ab..7854b43ee9 100644
--- a/games/mininim/mininim.SlackBuild
+++ b/games/mininim/mininim.SlackBuild
@@ -1,11 +1,31 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for mininim
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20220620 bkw: no changes, but notes to myself:
+# There's a later release of mininim (200928), but I
+# can't feasibly upgrade to it for now. It requires IUP
+# https://en.wikipedia.org/wiki/IUP_(software) which we don't have
+# in our repo (but that could be added). It also requires a newer
+# gnulib, but upgrading gnulib from 20140202 to 20210102~ebaa53c
+# (as used in recent debian stable) is probably OK... Unfortunately,
+# it also requires the mininim author's own fork of allegro5. This
+# could be added to the SBo repo or built statically here... but all
+# these things require more work than it's worth just for a game that
+# already plays OK with mininim-201701122309. I'm documenting this
+# here because every 6-8 months I get the idea to upgrade this build,
+# then rediscover the reasons why I didn't upgrade it already.
+
+# 20211028 bkw: BUILD=2
+# - fix -current build.
+# - new-style icon.
+# - /usr/share/mininim => /usr/share/games/mininim.
+# - still no new release.
+
# 20201105 bkw: Minor nitpickey edits to the script, but no changes
# to the package. 201701122309 is still the latest release. The newer
# stuff from this year is "Pre-alpha" and "Pre-release".
@@ -15,10 +35,13 @@
# sdlpop. As it stands, we have both (choice is good). mininim is a lot
# more unix-friendly, easier to package.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=mininim
VERSION=${VERSION:-201701122309}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -28,7 +51,11 @@ 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}
@@ -56,7 +83,6 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
@@ -67,6 +93,8 @@ sed -i 's,@arrow@,@arrow{}@,' doc/$PRGNAM.texi
# this takes a minute due to the gnulib stuff...
./bootstrap
+SLKCFLAGS+=" -fcommon"
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -77,6 +105,7 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
+ --datadir=/usr/share/games \
--build=$ARCH-slackware-linux
make
@@ -109,9 +138,15 @@ fi
# .desktop file written by SlackBuild author.
mkdir -p $PKG/usr/share/pixmaps $PKG/usr/share/applications
-ln -s ../$PRGNAM/data/icons/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+# upstream's icon (data/icons/mininim.png) is an oddball size, 24x43.
+# my icon was made by centering upstream's in a 48x48 transparent field.
+ICODIR=$PKG/usr/share/icons/hicolor/48x48/apps
+mkdir -p $ICODIR
+cat $CWD/$PRGNAM.png > $ICODIR/$PRGNAM.png
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
# docs already installed.
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -120,4 +155,4 @@ 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