diff options
author | B. Watson <yalhcru@gmail.com> | 2018-10-13 15:56:34 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-10-21 06:47:11 +0700 |
commit | 8097078228d02c985a7a05270a1e167eec59d2ab (patch) | |
tree | 38f16c647108c3606417176dccef2c6ac3a66bc5 | |
parent | 227999748fb48e22347e96cff8d65994ac158b35 (diff) | |
download | slackbuilds-8097078228d02c985a7a05270a1e167eec59d2ab.tar.gz |
games/pysolfc: Updated for version 2.4.0, new maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com>
-rw-r--r-- | games/pysolfc/README | 19 | ||||
-rw-r--r-- | games/pysolfc/doinst.sh | 1 | ||||
-rw-r--r-- | games/pysolfc/pysolfc.SlackBuild | 87 | ||||
-rw-r--r-- | games/pysolfc/pysolfc.info | 14 | ||||
-rw-r--r-- | games/pysolfc/slack-desc | 8 |
5 files changed, 85 insertions, 44 deletions
diff --git a/games/pysolfc/README b/games/pysolfc/README index d5a56b2779..d1f64a5d05 100644 --- a/games/pysolfc/README +++ b/games/pysolfc/README @@ -1,11 +1,16 @@ +pysolfc (solitaire card game suite) + PySolFC (PySol Fanclub Edition) is a solitaire suite containing over 1000 individual games. -PySolFC comes with several different cardsets, but there is a large number -of optional cardsets available. To install the additional cardsets -systemwide, have the cardset tarball in the SlackBuild directory at build -time. If you do not want to install the extra cardsets systemwide, or -decide to add them later, they can be extracted to ~/.PySolFC/cardsets +There are games that use the 52 card International Pattern deck, +games for the 78 card Tarock deck, eight and ten suite Ganjifa games, +Hanafuda games, Matrix games, Mahjongg games, and games for an original +hexadecimal-based deck. PySolFC features a modern look and feel, multiple +cardsets and backgrounds, sound, unlimited undo, player statistics, +and much more. + +PySolFC comes with several different cardsets, but there are many optional +cardsets available. These can be found in games/pysolfc-extra-cardsets. -The extra cardsets tarball is available here: -http://downloads.sourceforge.net/pysolfc/PySolFC-Cardsets-2.0.tar.bz2 +PySolFC is distributed under the terms of the GNU GPL. diff --git a/games/pysolfc/doinst.sh b/games/pysolfc/doinst.sh index 0fb9c8b686..aea0f894eb 100644 --- a/games/pysolfc/doinst.sh +++ b/games/pysolfc/doinst.sh @@ -11,4 +11,3 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 fi fi - diff --git a/games/pysolfc/pysolfc.SlackBuild b/games/pysolfc/pysolfc.SlackBuild index 20cb42ab62..67e8f4dc1d 100644 --- a/games/pysolfc/pysolfc.SlackBuild +++ b/games/pysolfc/pysolfc.SlackBuild @@ -22,17 +22,34 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -PRGNAM=PySolFC -PKGNAM=pysolfc -VERSION=${VERSION:-2.0} +# Now maintained by B. Watson <yalhcru@gmail.com> + +# 20181013 bkw: +# - Take over maintenance. +# - Update for v2.4.0. Incompatible changes, can't build the old +# version with VERSION=2.0, sorry. +# - Upstream removed all the cardsets from the source tarball, moved +# them to a separate "minimal" cardset tarball, so add it to DOWNLOAD +# and script stuff to handle it. +# - Get rid of the option to include the complete cardsets tarball. Moved +# to a separate pysylfc-extra-cardsets build. +# - Install the correct man page for the FC edition, not the old pre-fork +# pysol one. +# - Include all_games.html in the docdir (with fixed paths for the links). +# - Update README and slack-desc. + +SRCNAM=PySolFC +PRGNAM=pysolfc +VERSION=${VERSION:-2.4.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -CARDSETS=$PRGNAM-Cardsets-$VERSION +CARDSETVER=${CARDSETVER:-2.0} +CARDSETS=$SRCNAM-Cardsets--Minimal-$CARDSETVER if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,7 +57,7 @@ fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PKGNAM +PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} set -e @@ -48,36 +65,54 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 -cd $PRGNAM-$VERSION +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.xz +cd $SRCNAM-$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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# 20181012 bkw: Slightly dirty hack, to combat a dirty hack from upstream. +# Begin rant: +# Basically, the old versions of pysol used the python 'random' library, +# which ships with python2 (included in Slackware). With 2.4.0, they've +# ported the code so it's python3-compatible (though it still works +# with python2). The python3 random library is API-incompatible with +# the python2 one... so someone ported the python2 random to python3 +# and named it 'random2'. random2 is also python2-compatible... so the +# PySolFC devs changed their code to require random2, even on python +# 2. So I'm changing it back, to avoid adding an extra (redundant) dependency. +# The reason for going into such detail about it here, is that maintainers +# of other python-based packages might run into the same issue someday. +# I'll have a handy URL to point them to with the fix. +# Here endeth the rant. + +sed -i 's,\<random2\>,random,' pysollib/pysolrandom.py python setup.py install --root $PKG mkdir -p $PKG/usr/man/man6 -cat docs/pysol.6 > $PKG/usr/man/man6/pysol.6 ; gzip $PKG/usr/man/man6/pysol.6 +gzip -9c < docs/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz -## Are we installing extra cardsets? -if [ -e $CWD/$CARDSETS.tar.bz2 ]; then - echo -e "Extracting extra cardsets (this may take some time)..." - tar xf $CWD/$CARDSETS.tar.bz2 -C $TMP - cp -a $TMP/$CARDSETS/* $PKG/usr/share/$PRGNAM/ -fi +# Executable is called pysol.py, there damn well better be a man +# page with the same name. +ln -s $PRGNAM.6.gz $PKG/usr/man/man6/pysol.py.6 + +# The minimal cardsets are now required, since the source tarball +# has none. Extract directly to $PKG instead of extracting and copying. +tar xvf $CWD/$CARDSETS.tar.xz -C $PKG/usr/share/$SRCNAM/ --strip-components=1 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.md COPYING docs/README $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION -cp -a docs/README COPYING $PKG/usr/doc/$PKGNAM-$VERSION -cp -a README $PKG/usr/doc/$PKGNAM-$VERSION/README.install -cat $CWD/$PKGNAM.SlackBuild > $PKG/usr/doc/$PKGNAM-$VERSION/$PKGNAM.SlackBuild +# Handy HTML list of all the games, but with hardcoded (wrong) paths. +sed '/href=/s,"[^"]*/data,"/usr/share/'$SRCNAM, docs/all_games.html > \ + $PKG/usr/doc/$PRGNAM-$VERSION/all_games.html 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/$PKGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/pysolfc/pysolfc.info b/games/pysolfc/pysolfc.info index 6d9759ffa6..c853cad8cd 100644 --- a/games/pysolfc/pysolfc.info +++ b/games/pysolfc/pysolfc.info @@ -1,10 +1,12 @@ PRGNAM="pysolfc" -VERSION="2.0" -HOMEPAGE="http://pysolfc.sourceforge.net" -DOWNLOAD="http://downloads.sourceforge.net/pysolfc/PySolFC-2.0.tar.bz2" -MD5SUM="f9ee647947924efdf1d24af179d3cc0a" +VERSION="2.4.0" +HOMEPAGE="https://pysolfc.sourceforge.net" +DOWNLOAD="https://downloads.sourceforge.net/project/pysolfc/PySolFC/PySolFC-2.4.0/PySolFC-2.4.0.tar.xz \ + https://downloads.sourceforge.net/pysolfc/PySolFC-Cardsets--Minimal-2.0.tar.xz" +MD5SUM="43d3a6f82418a9cb7452ab7bc0e1401b \ + 85c0edeeb0e319d54f9ebcd4165a2077" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Matthew Fillpot" -EMAIL="mfilpot@gmail.com" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/games/pysolfc/slack-desc b/games/pysolfc/slack-desc index 7c128e7e3f..35b9a4caa7 100644 --- a/games/pysolfc/slack-desc +++ b/games/pysolfc/slack-desc @@ -6,14 +6,14 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -pysolfc: pysolfc (a solitaire suite) +pysolfc: pysolfc (solitaire card game suite) pysolfc: -pysolfc: PySolFC is a colection of more than 1000 solitaire card games. It is -pysolfc: a fork of the no longer maintained PySol Solitaire. There are games +pysolfc: PySolFC is a colection of more than 1000 solitaire card games. It is +pysolfc: a fork of the no longer maintained PySol Solitaire. There are games pysolfc: that use the 52 card International Pattern deck, games for the 78 card pysolfc: Tarock deck, eight and ten suite Ganjifa games, Hanafuda games, Matrix pysolfc: games, Mahjongg games, and games for an original hexadecimal-based -pysolfc: deck. PySolFC features a modern look and feel, multiple cardsets and +pysolfc: deck. PySolFC features a modern look and feel, multiple cardsets and pysolfc: backgrounds, sound, unlimited undo, player statistics, and much more. pysolfc: pysolfc: PySolFC is distributed under the terms of the GNU GPL. |