diff options
author | B. Watson <yalhcru@gmail.com> | 2021-12-09 12:05:43 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-12-10 08:37:38 +0700 |
commit | baf1e52a6b0b884b4097f7997831cbaf2cd99560 (patch) | |
tree | 3611e8f7fb63070ddf1dfe0bdb8d462efecf0058 /games/qzdl | |
parent | ddbfcd801f40b9379069039159aa2202b4c9a454 (diff) |
games/qzdl: Updated for version 3.2.2.3+20211008_9c76408.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/qzdl')
-rw-r--r-- | games/qzdl/README | 2 | ||||
-rw-r--r-- | games/qzdl/git2tarxz.sh | 84 | ||||
-rw-r--r-- | games/qzdl/qzdl.SlackBuild | 78 | ||||
-rw-r--r-- | games/qzdl/qzdl.info | 6 |
4 files changed, 140 insertions, 30 deletions
diff --git a/games/qzdl/README b/games/qzdl/README index b13f0dbe36fca..7154fb3cad12d 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/git2tarxz.sh b/games/qzdl/git2tarxz.sh new file mode 100644 index 0000000000000..83bc8b62edc81 --- /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 52e4050d4523f..524f485feb6f1 100644 --- a/games/qzdl/qzdl.SlackBuild +++ b/games/qzdl/qzdl.SlackBuild @@ -26,6 +26,11 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 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 @@ -35,8 +40,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=qzdl -VERSION=${VERSION:-3.2.2.3} -BUILD=${BUILD:-2} +VERSION=${VERSION:-3.2.2.3+20211008_9c76408} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -48,9 +53,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 @@ -80,33 +82,55 @@ 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 . - -./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 - +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 \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make +cd .. + +# no install or install/strip targets. mkdir -p $PKG/usr/games -install -s -m0755 zdl $PKG/usr/games +install -s -m0755 build/zdl $PKG/usr/games ln -s zdl $PKG/usr/games/$PRGNAM -mkdir -p $PKG/usr/share/applications \ - $PKG/usr/share/pixmaps \ - $PKG/usr/share/icons/hicolor/scalable/apps - -cp $CWD/qzdl.desktop $PKG/usr/share/applications -cp -a res/zdl3.svg $PKG/usr/share/pixmaps -ln -s ../../../../pixmaps/zdl3.svg $PKG/usr/share/icons/hicolor/scalable/apps +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 diff --git a/games/qzdl/qzdl.info b/games/qzdl/qzdl.info index 640628cd7a125..ff6cc2b26ab3e 100644 --- a/games/qzdl/qzdl.info +++ b/games/qzdl/qzdl.info @@ -1,8 +1,8 @@ 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="" |