aboutsummaryrefslogtreecommitdiff
path: root/games/oblige
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-20 16:31:20 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-29 17:07:20 +0700
commit9c060af33789d7d7a204d94b4377515b9bccee18 (patch)
tree42f1772cc4a774a4c0ba64aa4b8ff9d51b35d7f7 /games/oblige
parentc11a44608267a4df27b7721533c42102d2ee953b (diff)
games/oblige: Fix -current build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/oblige')
-rw-r--r--games/oblige/README12
-rw-r--r--games/oblige/doinst.sh5
-rw-r--r--games/oblige/icons/128.pngbin0 -> 27762 bytes
-rw-r--r--games/oblige/icons/16.pngbin0 -> 12889 bytes
-rw-r--r--games/oblige/icons/32.pngbin0 -> 14272 bytes
-rw-r--r--games/oblige/icons/48.pngbin0 -> 16470 bytes
-rw-r--r--games/oblige/icons/64.pngbin0 -> 19103 bytes
-rw-r--r--games/oblige/oblige.SlackBuild54
-rw-r--r--games/oblige/oblige.info2
-rw-r--r--games/oblige/slack-desc6
-rw-r--r--games/oblige/swap.6.20.diff.gzbin0 -> 458 bytes
-rw-r--r--games/oblige/swap.7.70.diff.gzbin0 -> 483 bytes
12 files changed, 58 insertions, 21 deletions
diff --git a/games/oblige/README b/games/oblige/README
index 27ad0146e5e1..4fad2b695f29 100644
--- a/games/oblige/README
+++ b/games/oblige/README
@@ -1,3 +1,5 @@
+oblige (random level generator for Doom engine games)
+
OBLIGE is a random level generator for Doom, Doom II, and their
expansion packs. The goal is to produce high quality levels which are
fun to play.
@@ -18,13 +20,13 @@ Ultimate Doom doom.wad or doomu.wad (?)
TNT Evilution tnt.wad
Plutonia plutonia.wad
-Older versions of oblige had support for Heretic and Quake. If you need
-these, install oblige-legacy4 (which can co-exist with this version).
+Older versions of oblige had support for Heretic, Hexen, and Quake. If
+you need these, install oblige-legacy4 (which can co-exist with this
+version).
Oblige 6 and 7 take completely different approaches to level generation.
Some people might prefer version 6, so this script supports both. By
-default, the version in the .info file (currently 7.666) is built. To
+default, the version in the .info file (currently 7.70) is built. To
build version 6 instead, get oblige-620-source.tar.gz from the author's
site, place it in the SlackBuild directory, and run the script with
-VERSION=6.20 in the environment. Also VERSION=7.50 is supported, if you
-have a use for that.
+VERSION=6.20 in the environment.
diff --git a/games/oblige/doinst.sh b/games/oblige/doinst.sh
index 4e8ba7071dea..3e5691a052b5 100644
--- a/games/oblige/doinst.sh
+++ b/games/oblige/doinst.sh
@@ -2,3 +2,8 @@ if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/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/oblige/icons/128.png b/games/oblige/icons/128.png
new file mode 100644
index 000000000000..a6ee73f133db
--- /dev/null
+++ b/games/oblige/icons/128.png
Binary files differ
diff --git a/games/oblige/icons/16.png b/games/oblige/icons/16.png
new file mode 100644
index 000000000000..2616f57ed2b6
--- /dev/null
+++ b/games/oblige/icons/16.png
Binary files differ
diff --git a/games/oblige/icons/32.png b/games/oblige/icons/32.png
new file mode 100644
index 000000000000..b2efe3c78e3f
--- /dev/null
+++ b/games/oblige/icons/32.png
Binary files differ
diff --git a/games/oblige/icons/48.png b/games/oblige/icons/48.png
new file mode 100644
index 000000000000..de8ce27a7177
--- /dev/null
+++ b/games/oblige/icons/48.png
Binary files differ
diff --git a/games/oblige/icons/64.png b/games/oblige/icons/64.png
new file mode 100644
index 000000000000..cd6c9874cecc
--- /dev/null
+++ b/games/oblige/icons/64.png
Binary files differ
diff --git a/games/oblige/oblige.SlackBuild b/games/oblige/oblige.SlackBuild
index 8e9d2b491730..e9deb08bd008 100644
--- a/games/oblige/oblige.SlackBuild
+++ b/games/oblige/oblige.SlackBuild
@@ -6,6 +6,11 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211020 bkw: BUILD=2
+# - fix -current build.
+# - binary in /usr/games.
+# - new-style icons.
+
# 20171220 bkw:
# - update for 7.70. Upstream calls this the final release :(
@@ -41,7 +46,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=oblige
VERSION=${VERSION:-7.70}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -53,9 +58,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
@@ -84,6 +86,19 @@ set -e
SRCVER=${VERSION//./}
SRCNAM="Oblige" # grrrr!
+if [ ! -e $CWD/swap.$VERSION.diff.gz ]; then
+ supported="$( echo $( /bin/ls $CWD/*.diff.gz | sed 's,.*/,,' | cut -d. -f2,3 ) )"
+ cat <<EOF
+
+*** Unsupported version of oblige: $VERSION.
+*** Supported versions are: $supported.
+*** The build will probably fail. Press ^C to abort, or wait
+*** 10 seconds to continue.
+
+EOF
+ sleep 10
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG/usr/bin $PKG/usr/share/$PRGNAM $OUTPUT
cd $TMP
@@ -99,32 +114,47 @@ fi
cd ${SRCNAM}-${VERSION}-source
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 {} \+
+
+# N.B. these diffs *must* be gzipped, they contain a mix of \n and
+# \r\n line endings, git would strip the \r's.
+zcat $CWD/swap.$VERSION.diff.gz | patch -p1
# 'make install' would install the .desktop and icon to /usr, not PREFIX.
sed -i '/xdg-/d' Makefile
# if there's no prefabs/ dir, don't try to install it. doing it this
-# way allows this script to still build oblige 7.666, if needed.
+# way would allow this script to still build oblige 7.666, if needed.
if [ ! -d prefabs ]; then
sed -i '/\/prefabs/d' Makefile
fi
make PREFIX=/usr OPTIMISE="$SLKCFLAGS"
make install PREFIX=$PKG/usr
+mv $PKG/usr/bin $PKG/usr/games
# man page written for this build (based on --help output)
mkdir -p $PKG/usr/man/man6
gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
# Starting with 6.20, upstream includes a .desktop and icon.
+# The icon's fugly though, see below.
mkdir -p $PKG/usr/share/pixmaps $PKG/usr/share/applications
-cat misc/icon_128x128.png > $PKG/usr/share/pixmaps/$PRGNAM.png
-cat misc/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+sed "s,Exec=,Exec=/usr/games/," \
+ < misc/$PRGNAM.desktop \
+ > $PKG/usr/share/applications/$PRGNAM.desktop
+
+# icons made from upstream's icon, by turning the background transparent.
+for i in $CWD/icons/*.png; do
+ px=$( basename $i | cut -d. -f1 )
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ cat $i > $dir/$PRGNAM.png
+done
+
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
rm -f INSTALL.txt # don't need compile instruction in bin package
diff --git a/games/oblige/oblige.info b/games/oblige/oblige.info
index 0d63183bce75..d733ec39711b 100644
--- a/games/oblige/oblige.info
+++ b/games/oblige/oblige.info
@@ -1,7 +1,7 @@
PRGNAM="oblige"
VERSION="7.70"
HOMEPAGE="http://oblige.sourceforge.net/"
-DOWNLOAD="http://ponce.cc/slackware/sources/repo/oblige-770-source.zip"
+DOWNLOAD="https://sourceforge.net/projects/oblige/files/Oblige/7.70/oblige-770-source.zip"
MD5SUM="0995d8c17ca051ff522084dc9a6e664f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
diff --git a/games/oblige/slack-desc b/games/oblige/slack-desc
index eceb6f9a133d..c8ea3b550665 100644
--- a/games/oblige/slack-desc
+++ b/games/oblige/slack-desc
@@ -8,9 +8,9 @@
|-----handy-ruler------------------------------------------------------|
oblige: oblige (random level generator for Doom engine games)
oblige:
-oblige: OBLIGE is a random level generator for various classic games,
-oblige: including DOOM, DOOM II, Heretic, and Quake. The goal is to produce
-oblige: high quality levels which are fun to play.
+oblige: OBLIGE is a random level generator for DOOM, DOOM II, and
+oblige: their expansion packs. The goal is to produce high quality
+oblige: levels which are fun to play.
oblige:
oblige:
oblige:
diff --git a/games/oblige/swap.6.20.diff.gz b/games/oblige/swap.6.20.diff.gz
new file mode 100644
index 000000000000..c28999f05566
--- /dev/null
+++ b/games/oblige/swap.6.20.diff.gz
Binary files differ
diff --git a/games/oblige/swap.7.70.diff.gz b/games/oblige/swap.7.70.diff.gz
new file mode 100644
index 000000000000..852632d9b86e
--- /dev/null
+++ b/games/oblige/swap.7.70.diff.gz
Binary files differ