aboutsummaryrefslogtreecommitdiff
path: root/games/wolf4sdl
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-15 15:18:11 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-29 17:07:14 +0700
commit1056ec5e5be84b6e666ed9c0ca22bf7d5fee281f (patch)
tree7a20ab81f4f4b2f0154140fc6dc5c7e1094b491e /games/wolf4sdl
parent49b71b0265b39530bd1c66477bc6a2fb6010ddf1 (diff)
games/wolf4sdl: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/wolf4sdl')
-rw-r--r--games/wolf4sdl/README6
-rw-r--r--games/wolf4sdl/doinst.sh6
-rw-r--r--games/wolf4sdl/icons/128.pngbin0 -> 27544 bytes
-rw-r--r--games/wolf4sdl/icons/16.pngbin0 -> 870 bytes
-rw-r--r--games/wolf4sdl/icons/32.pngbin0 -> 2388 bytes
-rw-r--r--games/wolf4sdl/icons/48.pngbin0 -> 4073 bytes
-rw-r--r--games/wolf4sdl/wolf4sdl-spear-demo.desktop3
-rw-r--r--games/wolf4sdl/wolf4sdl-spear-full.desktop3
-rw-r--r--games/wolf4sdl/wolf4sdl-wolf3d-demo.desktop3
-rw-r--r--games/wolf4sdl/wolf4sdl-wolf3d-full.desktop3
-rw-r--r--games/wolf4sdl/wolf4sdl.SlackBuild45
-rw-r--r--games/wolf4sdl/wolf4sdl.info4
12 files changed, 41 insertions, 32 deletions
diff --git a/games/wolf4sdl/README b/games/wolf4sdl/README
index ba2a6454f9973..6a20c5e87579f 100644
--- a/games/wolf4sdl/README
+++ b/games/wolf4sdl/README
@@ -1,8 +1,8 @@
wolf4sdl (Wolfenstein 3D engine)
-Wolf4SDL is an open-source SDL port of id Software's classic first-person
-shooter Wolfenstein 3D. It is meant to keep the original feel while
-taking advantage of some modern improvements.
+Wolf4SDL is an open-source SDL port of id Software's classic
+first-person shooter Wolfenstein 3D. It is meant to keep the original
+feel while taking advantage of some modern improvements.
This build includes the game data files from the shareware/demo versions
of Wolfenstein 3D and its sequel Spear of Destiny.
diff --git a/games/wolf4sdl/doinst.sh b/games/wolf4sdl/doinst.sh
index 5fb28930db0b9..3e5691a052b5b 100644
--- a/games/wolf4sdl/doinst.sh
+++ b/games/wolf4sdl/doinst.sh
@@ -1,3 +1,9 @@
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/wolf4sdl/icons/128.png b/games/wolf4sdl/icons/128.png
new file mode 100644
index 0000000000000..04cf9b9c6fd54
--- /dev/null
+++ b/games/wolf4sdl/icons/128.png
Binary files differ
diff --git a/games/wolf4sdl/icons/16.png b/games/wolf4sdl/icons/16.png
new file mode 100644
index 0000000000000..98efb19983aee
--- /dev/null
+++ b/games/wolf4sdl/icons/16.png
Binary files differ
diff --git a/games/wolf4sdl/icons/32.png b/games/wolf4sdl/icons/32.png
new file mode 100644
index 0000000000000..01d716cae796e
--- /dev/null
+++ b/games/wolf4sdl/icons/32.png
Binary files differ
diff --git a/games/wolf4sdl/icons/48.png b/games/wolf4sdl/icons/48.png
new file mode 100644
index 0000000000000..e3b560ba10736
--- /dev/null
+++ b/games/wolf4sdl/icons/48.png
Binary files differ
diff --git a/games/wolf4sdl/wolf4sdl-spear-demo.desktop b/games/wolf4sdl/wolf4sdl-spear-demo.desktop
index f887d96f7c05d..0d93ff5086060 100644
--- a/games/wolf4sdl/wolf4sdl-spear-demo.desktop
+++ b/games/wolf4sdl/wolf4sdl-spear-demo.desktop
@@ -2,7 +2,6 @@
Type=Application
Name=Wolf3D Spear of Destiny (Demo)
Icon=wolf4sdl
-TryExec=wolf4sdl-spear-demo
-Exec=wolf4sdl-spear-demo --windowed-mouse --res 960 720
+Exec=/usr/games/wolf4sdl-spear-demo --windowed-mouse --res 960 720
Terminal=false
Categories=Game;ActionGame;
diff --git a/games/wolf4sdl/wolf4sdl-spear-full.desktop b/games/wolf4sdl/wolf4sdl-spear-full.desktop
index 3d5ae3431f522..f231f6c1e161e 100644
--- a/games/wolf4sdl/wolf4sdl-spear-full.desktop
+++ b/games/wolf4sdl/wolf4sdl-spear-full.desktop
@@ -2,7 +2,6 @@
Type=Application
Name=Wolf3D Spear of Destiny (Full Version)
Icon=wolf4sdl
-TryExec=wolf4sdl-spear-full
-Exec=wolf4sdl-spear-full --windowed-mouse --res 960 720
+Exec=/usr/games/wolf4sdl-spear-full --windowed-mouse --res 960 720
Terminal=false
Categories=Game;ActionGame;
diff --git a/games/wolf4sdl/wolf4sdl-wolf3d-demo.desktop b/games/wolf4sdl/wolf4sdl-wolf3d-demo.desktop
index 5c014611805ff..de0e76225bc65 100644
--- a/games/wolf4sdl/wolf4sdl-wolf3d-demo.desktop
+++ b/games/wolf4sdl/wolf4sdl-wolf3d-demo.desktop
@@ -2,7 +2,6 @@
Type=Application
Name=Wolfenstein 3D (Demo)
Icon=wolf4sdl
-TryExec=wolf4sdl-wolf3d-demo
-Exec=wolf4sdl-wolf3d-demo --windowed-mouse --res 960 720
+Exec=/usr/games/wolf4sdl-wolf3d-demo --windowed-mouse --res 960 720
Terminal=false
Categories=Game;ActionGame;
diff --git a/games/wolf4sdl/wolf4sdl-wolf3d-full.desktop b/games/wolf4sdl/wolf4sdl-wolf3d-full.desktop
index 1e8a37c764bdb..b6d62ef2c6992 100644
--- a/games/wolf4sdl/wolf4sdl-wolf3d-full.desktop
+++ b/games/wolf4sdl/wolf4sdl-wolf3d-full.desktop
@@ -2,7 +2,6 @@
Type=Application
Name=Wolfenstein 3D (Full Version)
Icon=wolf4sdl
-TryExec=wolf4sdl-wolf3d-full
-Exec=wolf4sdl-wolf3d-full --windowed-mouse --res 960 720
+Exec=/usr/games/wolf4sdl-wolf3d-full --windowed-mouse --res 960 720
Terminal=false
Categories=Game;ActionGame;
diff --git a/games/wolf4sdl/wolf4sdl.SlackBuild b/games/wolf4sdl/wolf4sdl.SlackBuild
index 0e5ec3b686a47..b09ba8af91f3b 100644
--- a/games/wolf4sdl/wolf4sdl.SlackBuild
+++ b/games/wolf4sdl/wolf4sdl.SlackBuild
@@ -6,11 +6,13 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211015 bkw: BUILD=2, new-style icons.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=wolf4sdl
VERSION=${VERSION:-1.7}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -22,9 +24,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
@@ -59,11 +58,8 @@ rm -rf $SRCNAM-$VERSION-src
unzip $CWD/$SRCNAM-$VERSION-src.zip
cd $SRCNAM-$VERSION-src
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 640 -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 {} \+
# look for game data files in /usr/share/games/wolf3d
zcat $CWD/datadir.diff.gz | patch -p1
@@ -123,18 +119,29 @@ mv *.sdm $PKG/usr/share/games/wolf3d
chmod 644 $PKG/usr/share/games/wolf3d/*.sdm
# man page written for this build
-mkdir -p $PKG/usr/man/man6
-gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
-ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-wolf-demo.6.gz
-ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-wolf-full.6.gz
-ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-spear-demo.6.gz
-ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-spear-full.6.gz
-
-# icon came from gods know where (somewhere on upstream site)
-# .desktop files written for this build
+PKGMAN6=$PKG/usr/man/man6
+mkdir -p $PKGMAN6
+gzip -9c < $CWD/$PRGNAM.6 > $PKGMAN6/$PRGNAM.6.gz
+for i in {wolf,spear}-{demo,full}; do
+ ln -s $PRGNAM.6.gz $PKGMAN6/$PRGNAM-$i.6.gz
+done
+
+# Icons extracted from macosx/wolf4sdl.icns with icns2png.
+# 48.png scaled down from 512.png with 'convert -resize'.
+# Don't install 256x256 or 512x512 icons.
+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
+
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
+# .desktop files written for this build.
cp $CWD/*.desktop $PKG/usr/share/applications/
-cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a Changes.txt README.txt license-*.txt $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/games/wolf4sdl/wolf4sdl.info b/games/wolf4sdl/wolf4sdl.info
index 67fbbd21e69db..f80883524adc6 100644
--- a/games/wolf4sdl/wolf4sdl.info
+++ b/games/wolf4sdl/wolf4sdl.info
@@ -2,8 +2,8 @@ PRGNAM="wolf4sdl"
VERSION="1.7"
HOMEPAGE="https://github.com/mozzwald/wolf4sdl"
DOWNLOAD="https://slackware.uk/~urchlay/src/Wolf4SDL-1.7-src.zip \
- http://downloads.sourceforge.net/project/wolfgl/Data/Demo/wolfdata.zip \
- http://downloads.sourceforge.net/project/wolfgl/Data/Demo/sdmdata.zip"
+ https://downloads.sourceforge.net/project/wolfgl/Data/Demo/wolfdata.zip \
+ https://downloads.sourceforge.net/project/wolfgl/Data/Demo/sdmdata.zip"
MD5SUM="303f340598bfbe3440523c1ddb9f52e8 \
bc4564940cae816aec0f4af0b8436baf \
0aa1f89a8f5ddef700613b0f428fd8b0"