games/tkgames: Added (a collection of card and puzzle games).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2021-12-19 11:23:27 -05:00 committed by Willy Sudiarto Raharjo
parent 67defd630c
commit 1641c798ba
No known key found for this signature in database
GPG key ID: 3F617144D7238786
17 changed files with 215 additions and 0 deletions

13
games/tkgames/README Normal file
View file

@ -0,0 +1,13 @@
tkgames (a collection of card and puzzle games)
tkgames is a small collection of simple games written in Tcl, using Tk
for the user interface. Included games:
- polypuzzle, a rather difficult geometric puzzle game.
- tkhangman, word game.
- tkhearts, Hearts card game, play against computer.
- tksol (TkSolitaire), classic Patience solitaire card game.
- tkspider, solitaire card game.
- tktk (TkTimeKiller), pyramid solitaire card game.
- tktp (TkTripeaks), a simpler pyramid solitaire card game.
- tkyahtzee, dice game.

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=PolyPuzzle
Comment=Geometric puzzle game
Exec=polypuzzle
Icon=polypuzzle
Type=Application
Terminal=false
Categories=Game;LogicGame;

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=TkHangMan
Comment=Word puzzle game
Exec=tkhangman
Icon=tkhangman
Type=Application
Terminal=false
Categories=Game;LogicGame;

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=TkHearts
Comment=Hearts card game
Exec=tkhearts
Icon=tkgames-cards
Type=Application
Terminal=false
Categories=Game;CardGame;

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=TkSolitaire
Comment=Patience solitaire card game
Exec=tksol
Icon=tkgames-cards
Type=Application
Terminal=false
Categories=Game;CardGame;

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=TkSpider
Comment=Solitaire card game
Exec=tkspider
Icon=tkgames-cards
Type=Application
Terminal=false
Categories=Game;CardGame;

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=TkTimeKiller
Comment=Pyramid solitaire card game
Exec=tktk
Icon=tkgames-cards
Type=Application
Terminal=false
Categories=Game;CardGame;

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=TkTriPeaks
Comment=Pyramid solitaire card game
Exec=tktp
Icon=tkgames-cards
Type=Application
Terminal=false
Categories=Game;CardGame;

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Name=TkYahtzee
Comment=Dice game
Exec=tkyahtzee
Icon=tkyahtzee
Type=Application
Terminal=false
Categories=Game;LogicGame;

9
games/tkgames/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

19
games/tkgames/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------------------------------------------------------|
tkgames: tkgames (a collection of card and puzzle games)
tkgames:
tkgames: tkgames is a small collection of simple games written in Tcl, using Tk
tkgames: for the user interface. Included games: polypuzzle tkhangman tkhearts
tkgames: tksol tkspider tktk tktp tkyahtzee.
tkgames:
tkgames:
tkgames:
tkgames:
tkgames:
tkgames:

100
games/tkgames/tkgames.SlackBuild Executable file
View file

@ -0,0 +1,100 @@
#!/bin/bash
# Slackware build script for tkgames
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# Note: I'm only packaging the games. The other stuff is:
# - alert, basically xmessage rewritten in tcl/tk.
# - tkexe, a "run command" dialog (we have plenty of those already).
# - mamex and sdlmamex, outdated frontends for outdated MAME ports.
# modern MAME has its own frontend anyway.
# - the docs mention "Scid vs. PC" and "TkTimidity++", but these aren't
# in the tarball.
# - also not packaging tksol/tksol_green (same game, different background).
# If I'm being 100% honest, I really only care about tkhearts. There
# aren't a lot of choices for playing Hearts on Linux, unless you want
# to play in a browser and look at ads.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=tkgames
VERSION=${VERSION:-1.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
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 {} \+
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/usr/games $PKG/usr/share/games $PKG/usr/man/man6 $PKGDOC
# cruft and hidden docs.
cp -a tksol/readme $PKGDOC/tksol.txt
cp -a tkhangman/README $PKGDOC/tkhangman.txt
gzip -9c < tksol/tksol.6 > $PKG/usr/man/man6/tksol.6.gz
rm -rf */.menus.swp tksol/{tksol.6,readme,install,tksol_green} \
tkhangman/{extras,hangman,README,INSTALL}
# tkhearts logs too much to stdout, including spoilers (e.g. if one of
# the AIs decides to shoot the moon). squelch.
sed -i '/^[\t ]*puts *"/s,^,#,' tkhearts-*
# These are self-contained executables, run from anywhere, no external files.
for i in tkhearts tkspider tktk tktp tkyahtzee; do
cp -a $i-* $PKG/usr/games/$i
done
# These need external files, and have an install directory.
for i in polypuzzle tkhangman tksol; do
sed -i 's,/usr/local/lib,/usr/share/games,' $i/$i
mv $i/$i $PKG/usr/games/$i
cp -a $i $PKG/usr/share/games/$i
done
# Some icons extracted from the tcl code (where they appear as
# base64'ed gifs), some were already external files. Tweaked them with
# the gimp to look good as 64x64.
mkdir -p $PKG/usr/share/icons/hicolor/64x64/apps $PKG/usr/share/pixmaps
install -oroot -groot -m0644 $CWD/icons/* $PKG/usr/share/icons/hicolor/64x64/apps
for i in $CWD/icons/*; do
ln -s ../icons/hicolor/64x64/apps/$(basename $i) $PKG/usr/share/pixmaps
done
# .desktop files written for this SlackBuild.
mkdir -p $PKG/usr/share/applications
install -oroot -groot -m0644 $CWD/desktop/*.desktop $PKG/usr/share/applications
cp -a docs/index.{html,txt} docs/images $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,10 @@
PRGNAM="tkgames"
VERSION="1.3"
HOMEPAGE="https://sourceforge.net/projects/tkgames/"
DOWNLOAD="https://downloads.sourceforge.net/project/tkgames/tarballs/main/tkgames-1.3.tgz"
MD5SUM="74f07b039b3f2ea6d4790478fe9f76e7"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"