diff options
author | B. Watson <yalhcru@gmail.com> | 2020-11-20 13:12:37 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-11-22 01:14:16 +0700 |
commit | 37fdc9220c4374f0a0fe386b32542fc00d662aec (patch) | |
tree | 2c22965f842f25eb75833ef972efb35591a52822 | |
parent | 6c237e00fe7cc8c11d1555d9aeff5fab7c918488 (diff) |
games/hack-of-life: Added (networked Conway's Life variant)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | games/hack-of-life/README | 19 | ||||
-rw-r--r-- | games/hack-of-life/git2tarxz.sh | 44 | ||||
-rw-r--r-- | games/hack-of-life/hack-of-life.SlackBuild | 90 | ||||
-rw-r--r-- | games/hack-of-life/hack-of-life.info | 10 | ||||
-rw-r--r-- | games/hack-of-life/hackoflife.6 | 66 | ||||
-rw-r--r-- | games/hack-of-life/hackoflife.rst | 55 | ||||
-rw-r--r-- | games/hack-of-life/slack-desc | 19 |
7 files changed, 303 insertions, 0 deletions
diff --git a/games/hack-of-life/README b/games/hack-of-life/README new file mode 100644 index 0000000000000..db0488fcc802f --- /dev/null +++ b/games/hack-of-life/README @@ -0,0 +1,19 @@ +hack-of-life (networked multiplayer curses Conway's Life variant) + +hack-of-life is a modified version of Conway's Game of Life that has +multiple colors of cells. The object of the game is to defeat other +players by eliminating their cells, and/or cover over 1/3 of the board +with cells of your color. + +Considering how Life is a zero-player game, it makes it lots of fun +as a curiosity, but makes it very easy for people who are not Life +enthusiasts to quickly become bored after watching yet another glider +explode. + +So this decides to put the Game back in the Game of Life. And it does +that by taking the interface of the RogueLike genre of computer games +and terribly abusing it. The name of the game is adopted from the +RogueLike giant NetHack, resulting in the Hack of Life. + +Note: the executable is called "hackoflife" (not "hack-of-life" like +the package name). diff --git a/games/hack-of-life/git2tarxz.sh b/games/hack-of-life/git2tarxz.sh new file mode 100644 index 0000000000000..a3e73a354e2b7 --- /dev/null +++ b/games/hack-of-life/git2tarxz.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# Create source tarball from git repo, with generated version +# number. + +# Note that 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. + +# Takes one optional argument, which is the commit or tag to create +# a tarball of. With no arg, HEAD is used. + +PRGNAM=hack-of-life +CLONE_URL=https://github.com/isharacomix/hack-of-life + +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 ) + +VERSION=${DATE}_${GIT_SHA} + +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" diff --git a/games/hack-of-life/hack-of-life.SlackBuild b/games/hack-of-life/hack-of-life.SlackBuild new file mode 100644 index 0000000000000..71c1b7f0fe5dc --- /dev/null +++ b/games/hack-of-life/hack-of-life.SlackBuild @@ -0,0 +1,90 @@ +#!/bin/sh + +# Slackware build script for hack-of-life + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# Note: to me, the control scheme of this game is *terrible*, totally +# unusable. H J K L for left/down/up/right is OK (vi and all) but the +# diagonals are Y U B N. I suppose since it's a roguelike, that's a +# standard in the roguelike world... It's not configurable in this +# game, meaning I'm never going to enjoy playing it very much :( + +PRGNAM=hack-of-life +VERSION=${VERSION:-20130628_3a6c824} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz --exclude="*/windows" +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 {} \+ + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --bindir=/usr/games \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG + +# man page by SlackBuild author. Not much to it, just a pointer to the +# real docs in the README. So it is written: All thy binaries shalt +# have man pages, lest thine users become wroth with thee. +mkdir -p $PKG/usr/man/man6 +gzip -9c < $CWD/hackoflife.6 > $PKG/usr/man/man6/hackoflife.6.gz + +# symlink the man page for the package name. I don't know why the author +# chose to name the package and executable 2 different names... +ln -s hackoflife.6.gz $PKG/usr/man/man6/$PRGNAM.6.gz + +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:-tgz} diff --git a/games/hack-of-life/hack-of-life.info b/games/hack-of-life/hack-of-life.info new file mode 100644 index 0000000000000..e7e7eb2225b7d --- /dev/null +++ b/games/hack-of-life/hack-of-life.info @@ -0,0 +1,10 @@ +PRGNAM="hack-of-life" +VERSION="20130628_3a6c824" +HOMEPAGE="https://github.com/isharacomix/hack-of-life" +DOWNLOAD="https://slackware.uk/~urchlay/src/hack-of-life-20130628_3a6c824.tar.xz" +MD5SUM="b98a5d1a43d8c883d47713820f7bc85e" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/games/hack-of-life/hackoflife.6 b/games/hack-of-life/hackoflife.6 new file mode 100644 index 0000000000000..ed3d38339eda9 --- /dev/null +++ b/games/hack-of-life/hackoflife.6 @@ -0,0 +1,66 @@ +.\" Man page generated from reStructuredText. +. +.TH HACKOFLIFE 6 "2020-11-20" "20130628_3a6c824" "SlackBuilds.org" +.SH NAME +hackoflife \- networked multiplayer curses Conway's Life variant +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.\" RST source for hackoflife(6) man page. Convert with: +. +.\" rst2man.py hackoflife.rst > hackoflife.6 +. +.\" rst2man.py comes from the SBo development/docutils package. +. +.SH SYNOPSIS +.sp +hackoflife +.SH DESCRIPTION +.sp +\fBhackoflife\fP is a modified version of Conway\(aqs Game of Life that has +multiple colors of cells. The object of the game is to defeat other +players by eliminating their cells, and/or cover over 1/3 of the board +with your color of cell. +.sp +There are no command\-line options or arguments. The program is +controlled via its built\-in menus. For full documentation, see: +.sp +/usr/doc/hack\-of\-life\-20130628_3a6c824/README +.SH COPYRIGHT +.sp +See the file /usr/doc/hack\-of\-life\-20130628_3a6c824/COPYING for license information. +.SH AUTHORS +.sp +hackoflife was written by isharacomix. +.sp +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. +.SH SEE ALSO +.sp +The hackoflife homepage: \fI\%https://github.com/isharacomix/hack\-of\-life\fP +.\" Generated by docutils manpage writer. +. diff --git a/games/hack-of-life/hackoflife.rst b/games/hack-of-life/hackoflife.rst new file mode 100644 index 0000000000000..df5453266cd7a --- /dev/null +++ b/games/hack-of-life/hackoflife.rst @@ -0,0 +1,55 @@ +.. RST source for hackoflife(6) man page. Convert with: +.. rst2man.py hackoflife.rst > hackoflife.6 +.. rst2man.py comes from the SBo development/docutils package. + +.. |version| replace:: 20130628_3a6c824 +.. |date| date:: + +========== +hackoflife +========== + +-------------------------------------------------- +networked multiplayer curses Conway's Life variant +-------------------------------------------------- + +:Manual section: 6 +:Manual group: SlackBuilds.org +:Date: |date| +:Version: |version| + +SYNOPSIS +======== + +hackoflife + +DESCRIPTION +=========== + +**hackoflife** is a modified version of Conway's Game of Life that has +multiple colors of cells. The object of the game is to defeat other +players by eliminating their cells, and/or cover over 1/3 of the board +with your color of cell. + +There are no command-line options or arguments. The program is +controlled via its built-in menus. For full documentation, see: + +/usr/doc/hack-of-life-|version|/README + +COPYRIGHT +========= + +See the file /usr/doc/hack-of-life-|version|/COPYING for license information. + +AUTHORS +======= + +hackoflife was written by isharacomix. + +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. + +SEE ALSO +======== + +The hackoflife homepage: https://github.com/isharacomix/hack-of-life diff --git a/games/hack-of-life/slack-desc b/games/hack-of-life/slack-desc new file mode 100644 index 0000000000000..5efc1e351356c --- /dev/null +++ b/games/hack-of-life/slack-desc @@ -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------------------------------------------------------| +hack-of-life: hack-of-life (networked multiplayer Conway's Life variant) +hack-of-life: +hack-of-life: hack-of-life is a modified version of Conway's Game of Life that has +hack-of-life: multiple colors of cells. The object of the game is to defeat other +hack-of-life: players by eliminating their cells, and/or cover over 1/3 of the board +hack-of-life: with cells of your color. +hack-of-life: +hack-of-life: +hack-of-life: +hack-of-life: +hack-of-life: |