games/quackle: Added (crossword game).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-03-11 20:23:46 +07:00 committed by Willy Sudiarto Raharjo
parent 050d496a79
commit 7d86a62013
7 changed files with 151 additions and 0 deletions

5
games/quackle/README Normal file
View file

@ -0,0 +1,5 @@
quackle (crossword game similar to Scrabble[TM])
Quackle is a crossword game playing, analysis, and study tool. It
allows playing against the computer or other humans, and includes
dictionaries for many languages.

9
games/quackle/doinst.sh Normal file
View file

@ -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

View file

@ -0,0 +1,90 @@
#!/bin/bash
# Slackware build script for quackle
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=quackle
VERSION=${VERSION:-1.0.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
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}
# qmake picks the correct CFLAGS, we don't need SLKCFLAGS.
# nothing goes in /usr/lib(64)?, so we don't need LIBDIRSUFFIX.
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
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 {} \+
# Note: there's CMakeLists.txt, but upstream's docs say to use qmake.
# Looking at the cmake stuff, it seems to be written for Mac and
# Windows only, not Linux.
for dir in . quackleio quacker; do
( cd $dir && qmake-qt5 && make )
done
# no 'make install'. it expects to find data/ in the current dir, so
# there's a wrapper script.
mkdir -p $PKG/usr/libexec/$PRGNAM $PKG/usr/games $PKG/usr/share/games/$PRGNAM
install -oroot -groot -m0755 $CWD/$PRGNAM.sh $PKG/usr/games/$PRGNAM
install -s quacker/Quackle $PKG/usr/libexec/$PRGNAM/$PRGNAM
find data -name CMakeLists.txt | xargs rm -f
cp -a data $PKG/usr/share/games/$PRGNAM
# .desktop file written by SlackBuild author.
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
for i in quacker/Images.xcassets/AppIcon.appiconset/*.png; do
px="$( basename $i .png | cut -d- -f2)"
sz="${px}x${px}"
dir=$PKG/usr/share/icons/hicolor/$sz/apps
mkdir -p $dir
cp -a $i $dir/$PRGNAM.png
done
mkdir -p $PKG/usr/share/pixmaps
ln -s ../icons/hicolor/64x64/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
# README.md is just the compile instructions, don't bother.
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a LICENSE $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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

View file

@ -0,0 +1,9 @@
[Desktop Entry]
Name=Quackle
GenericName=Crossword Game
Comment=Game similar to Scrabble(tm)
Exec=/usr/games/quackle
Icon=quackle
Terminal=false
Type=Application
Categories=Game;BoardGame

View file

@ -0,0 +1,10 @@
PRGNAM="quackle"
VERSION="1.0.4"
HOMEPAGE="https://github.com/quackle/quackle"
DOWNLOAD="https://github.com/quackle/quackle/archive/v1.0.4/quackle-1.0.4.tar.gz"
MD5SUM="7f850f0e7c8e810578bb2dadbede3903"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"

9
games/quackle/quackle.sh Normal file
View file

@ -0,0 +1,9 @@
#!/bin/sh
# shell script wrapper for quackle SBo build (WTFPL).
# the game doesn't appear to write to its current directory, all
# preferences get saved to ~/.config/Quackle.org/Quackle.conf
# so we don't need a private per-user directory here.
cd /usr/share/games/quackle
exec /usr/libexec/quackle/quackle "$@"

19
games/quackle/slack-desc Normal file
View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
quackle: quackle (crossword game similar to Scrabble[TM])
quackle:
quackle: Quackle is a crossword game playing, analysis, and study tool. It
quackle: allows playing against the computer or other humans, and includes
quackle: dictionaries for many languages.
quackle:
quackle:
quackle:
quackle:
quackle:
quackle: