summaryrefslogtreecommitdiffstats
path: root/games/qzdl
diff options
context:
space:
mode:
Diffstat (limited to 'games/qzdl')
-rw-r--r--games/qzdl/README2
-rw-r--r--games/qzdl/doinst.sh9
-rw-r--r--games/qzdl/git2tarxz.sh84
-rw-r--r--games/qzdl/qzdl.SlackBuild108
-rw-r--r--games/qzdl/qzdl.info10
5 files changed, 172 insertions, 41 deletions
diff --git a/games/qzdl/README b/games/qzdl/README
index b13f0dbe36..7154fb3cad 100644
--- a/games/qzdl/README
+++ b/games/qzdl/README
@@ -1,2 +1,4 @@
+qzdl (Qt Doom Launcher)
+
A simple Qt launcher for Doom engines. Can be used to play default Doom
WADs or custom ones.
diff --git a/games/qzdl/doinst.sh b/games/qzdl/doinst.sh
new file mode 100644
index 0000000000..3e5691a052
--- /dev/null
+++ b/games/qzdl/doinst.sh
@@ -0,0 +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/qzdl/git2tarxz.sh b/games/qzdl/git2tarxz.sh
new file mode 100644
index 0000000000..83bc8b62ed
--- /dev/null
+++ b/games/qzdl/git2tarxz.sh
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# Create source tarball from git repo, with generated version number.
+
+# Special weirdness here, because of upstream's use of cmake's
+# FetchContent. Dunno why they didn't just use a git submodule...
+
+# Takes one optional argument, which is the commit or tag to create a
+# tarball of. With no arg, HEAD is used.
+
+# Version number example: 0.0.1+20200227_ad7ec17
+
+# Notes:
+
+# Do not use this if you're packaging a release.
+
+# This script doesn't need to be run as root. It does need to be able
+# to write to the current directory it's run from.
+
+# Running this script twice for the same commit will NOT give identical
+# tarballs, even if the contents are identical. This is because tar
+# includes the current time in a newly-created tarball (plus there may
+# be other git-related reasons).
+
+# Once you've generated a tarball, you'll still need a place to host it.
+# Ask on the mailing list, if you don't have your own web server to
+# play with.
+
+## Config:
+# Github project and user names:
+PRGNAM=qzdl
+GITUSER=qbasicer
+
+# For github projects, you can use this unmodified:
+CLONE_URL=https://github.com/$GITUSER/$PRGNAM.git
+
+# For non-github projects, you might not need GITUSER, in which case
+# just omit it from the script.
+
+## End of config.
+
+set -e
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+git clone $CLONE_URL $GITDIR
+
+CWD="$( pwd )"
+cd $GITDIR
+
+if [ "$1" != "" ]; then
+ git reset --hard "$1" || exit 1
+fi
+
+GIT_SHA=$( git rev-parse --short HEAD )
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+
+VERTAG=$( git tag -l | tail -1 | sed 's,^v,,' )
+
+VERSION=${VERTAG}+${DATE}_${GIT_SHA}
+
+# FetchContent stuff
+mkdir -p build
+cd build
+cmake ..
+cd -
+mv build/_deps .keepme
+rm -rf build
+mkdir -p build
+mv .keepme build/_deps
+
+rm -rf .git
+find . -name .gitignore -print0 | xargs -0 rm -f
+
+cd "$CWD"
+rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz
+mv $GITDIR $PRGNAM-$VERSION
+tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION
+
+echo
+echo "Created tarball: $PRGNAM-$VERSION.tar.xz"
+echo "VERSION=\"$VERSION\""
+echo "MD5SUM=\"$( md5sum $PRGNAM-$VERSION.tar.xz | cut -d' ' -f1 )\""
diff --git a/games/qzdl/qzdl.SlackBuild b/games/qzdl/qzdl.SlackBuild
index bb793949d5..2f478bb37b 100644
--- a/games/qzdl/qzdl.SlackBuild
+++ b/games/qzdl/qzdl.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for qzdl
#
-# Copyright 2015 Gethyn ThomasQuail <gethyn@bloodbathsoftworks.com>
+# Copyright 2015 Gethyn ThomasQuail <email removed>
+# Copyright 2020 B. Watson
# All rights reserved.
#
# Based on:
@@ -25,10 +26,26 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230107 bkw: BUILD=2, add doinst.sh.
+
+# 20211209 bkw:
+# - update for latest git, 3.2.2.3+20211008_9c76408. needed for building
+# on -current.
+# - new-style icons.
+
+# 20200416 bkw:
+# - take over maintenance
+# - binaries in /usr/games
+# - symlink icon to /usr/share/icons
+# - various tweaks
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=qzdl
-VERSION=${VERSION:-3.2.2.3}
+VERSION=${VERSION:-3.2.2.3+20211008_9c76408}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,7 +55,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}
@@ -63,39 +84,53 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
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 {} \;
-
-# Let's compile!
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux \
- --disable-updater
-
-make
-
-# Makes bin directory and copies over executable
-mkdir -p $PKG/usr/bin
-cp -a zdl $PKG/usr/bin
-
-# Makes desktop file related directories
-mkdir -p $PKG/usr/share/applications
-mkdir -p $PKG/usr/share/pixmaps
-
-# Copies over desktop file and icon
-cp $CWD/qzdl.desktop $PKG/usr/share/applications
-cp -a res/zdl3.svg $PKG/usr/share/pixmaps
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# 20211209 bkw: FETCHCONTENT_FULLY_DISCONNECTED stops it trying
+# to do a git clone of its dependency 'inih'. Means we have to
+# already have inih source in our tarball; see git2tarxz.sh.
+mkdir -p build
+cd build
+ cmake \
+ -DFETCHCONTENT_FULLY_DISCONNECTED=ON \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+cd ..
+
+# no install or install/strip targets.
+mkdir -p $PKG/usr/games
+install -s -m0755 build/zdl $PKG/usr/games
+ln -s zdl $PKG/usr/games/$PRGNAM
+
+HICOLOR=$PKG/usr/share/icons/hicolor
+PIXMAPS=$PKG/usr/share/pixmaps
+APPS=$PKG/usr/share/applications
+
+mkdir -p $APPS $PIXMAPS $HICOLOR/{48x48,scalable}/apps
+
+cp $CWD/qzdl.desktop $APPS
+cp -a res/zdl3.svg $HICOLOR/scalable/apps
+for px in 16 32 48 64 128; do
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ if [ -e res/zdl3-$size.png ]; then
+ echo "=== copy $size"
+ cp -a res/zdl3-$size.png $dir/$PRGNAM.png
+ else
+ echo "=== convert $size"
+ convert -resize $size res/zdl3-1024x1024.png $dir/$PRGNAM.png
+ fi
+done
+
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PIXMAPS/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS CHANGELOG LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
@@ -103,6 +138,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
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
diff --git a/games/qzdl/qzdl.info b/games/qzdl/qzdl.info
index afc05874c7..1a21585e76 100644
--- a/games/qzdl/qzdl.info
+++ b/games/qzdl/qzdl.info
@@ -1,10 +1,10 @@
PRGNAM="qzdl"
-VERSION="3.2.2.3"
+VERSION="3.2.2.3+20211008_9c76408"
HOMEPAGE="https://github.com/qbasicer/qzdl"
-DOWNLOAD="https://github.com/qbasicer/qzdl/archive/v3.2.2.3/qzdl-3.2.2.3.tar.gz"
-MD5SUM="50e61034d288d57ab3aecbd03dcf946a"
+DOWNLOAD="https://slackware.uk/~urchlay/src/qzdl-3.2.2.3+20211008_9c76408.tar.xz"
+MD5SUM="381555391ca3cf9bff39442f78a3c9c3"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Dugan Chen"
-EMAIL="thedoogster [at] gmail [dot] com"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"