slackbuilds_ponce/games/pysolfc-extra-cardsets/pysolfc-extra-cardsets.SlackBuild
B. Watson 7a4d769d64
games/pysolfc-extra-cardsets: Updated for version 3.0.
Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2024-08-31 07:56:37 +07:00

97 lines
2.6 KiB
Bash

#!/bin/bash
# Slackware build script for pysolfc-extra-cardsets
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20240824 bkw: updated for v3.0.
# 20231217 bkw: updated for v2.2.
# 20230111 bkw: updated for v2.1.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pysolfc-extra-cardsets
SRCNAM=PySolFC-Cardsets
VERSION=${VERSION:-3.0}
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
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG/usr/share/PySolFC $OUTPUT
cd $PKG/usr/share/PySolFC
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2 --strip-components=1
tar xvf $CWD/pysolfc-cardsets-bknoll.tar.xz --strip-components=1
# 20240824 bkw: 3.0.0 release tarball includes a hidden dir full of
# duplicates. Don't need.
rm -rf .fr-KuTbSg
# Don't include cardsets that are already in the main pysolfc package.
# 20231217 bkw: matching and matching-xl moved to the main pkg in 2.20.0.
# 20240824 bkw: quite a few added to the list in 3.0.
rm -rf \
cardset-2000 \
cardset-blaren-7x7 \
cardset-crystal-mahjongg \
cardset-dashavatara-ganjifa-xl \
cardset-dashavatara-ganjifa \
cardset-dojouji-3x3 \
cardset-dondorf \
cardset-gnome-mahjongg-1 \
cardset-hanafuda-200-years \
cardset-hexadeck \
cardset-hokusai-6x6 \
cardset-knave-of-hearts-4x4 \
cardset-louie-mantia-hanafuda \
cardset-matching-xl \
cardset-matching \
cardset-matrix \
cardset-mid-winter-eve-8x8 \
cardset-mughal-ganjifa-xl \
cardset-mughal-ganjifa \
cardset-neo-hex \
cardset-neo-tarock \
cardset-neo \
cardset-next-matrix \
cardset-oxymoron \
cardset-players-trumps-10x10 \
cardset-simple-ishido-xl \
cardset-simple-ishido \
cardset-standard \
cardset-the-card-players-9x9 \
cardset-tuxedo \
cardset-uni-mahjongg \
cardset-victoria-falls-5x5 \
cardset-vienna-2k
chown -R root:root .
# No executables, all files should be 644 here.
find -L . -type d -a \! -perm 755 -a -exec chmod 755 {} + -o \
-type f -a \! -perm 644 -a -exec chmod 644 {} +
# No docs, include our own README.
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE