mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
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>
This commit is contained in:
parent
6c237e00fe
commit
37fdc9220c
7 changed files with 303 additions and 0 deletions
19
games/hack-of-life/README
Normal file
19
games/hack-of-life/README
Normal file
|
@ -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).
|
44
games/hack-of-life/git2tarxz.sh
Normal file
44
games/hack-of-life/git2tarxz.sh
Normal file
|
@ -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"
|
90
games/hack-of-life/hack-of-life.SlackBuild
Normal file
90
games/hack-of-life/hack-of-life.SlackBuild
Normal file
|
@ -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}
|
10
games/hack-of-life/hack-of-life.info
Normal file
10
games/hack-of-life/hack-of-life.info
Normal file
|
@ -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"
|
66
games/hack-of-life/hackoflife.6
Normal file
66
games/hack-of-life/hackoflife.6
Normal file
|
@ -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.
|
||||||
|
.
|
55
games/hack-of-life/hackoflife.rst
Normal file
55
games/hack-of-life/hackoflife.rst
Normal file
|
@ -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
|
19
games/hack-of-life/slack-desc
Normal file
19
games/hack-of-life/slack-desc
Normal 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------------------------------------------------------|
|
||||||
|
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:
|
Loading…
Reference in a new issue