aboutsummaryrefslogtreecommitdiff
path: root/games/ncursesoflife
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-11-14 06:10:12 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-11-14 17:16:42 +0700
commite6072056e771bcf271f7bb67ff6d3e2a3bdefabf (patch)
treed84b9b6e954240b8fefe0884845b468633dc16a9 /games/ncursesoflife
parentbf5da0a0ca6432eaf8961a1997c4caf850e4f99a (diff)
games/ncursesoflife: Added (console Conway's Game of Life)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/ncursesoflife')
-rw-r--r--games/ncursesoflife/README5
-rw-r--r--games/ncursesoflife/git2tarxz.sh45
-rw-r--r--games/ncursesoflife/ncursesoflife.697
-rw-r--r--games/ncursesoflife/ncursesoflife.SlackBuild70
-rw-r--r--games/ncursesoflife/ncursesoflife.info10
-rw-r--r--games/ncursesoflife/ncursesoflife.rst80
-rw-r--r--games/ncursesoflife/slack-desc19
7 files changed, 326 insertions, 0 deletions
diff --git a/games/ncursesoflife/README b/games/ncursesoflife/README
new file mode 100644
index 000000000000..28c038edea61
--- /dev/null
+++ b/games/ncursesoflife/README
@@ -0,0 +1,5 @@
+ncursesoflife (console Conway's Game of Life)
+
+ncursesoflife is a simple Conway's Life simulator, with the ability
+to draw your own patterns and run the simulation one step at a time
+or continuously. It runs in a terminal and uses keyboard controls.
diff --git a/games/ncursesoflife/git2tarxz.sh b/games/ncursesoflife/git2tarxz.sh
new file mode 100644
index 000000000000..a607cc682cc4
--- /dev/null
+++ b/games/ncursesoflife/git2tarxz.sh
@@ -0,0 +1,45 @@
+#!/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=ncursesoflife
+CLONE_URL=https://github.com/AftExploision/NcursesOfLife
+
+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=1.30_beta+${DATE}_${GIT_SHA}
+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/ncursesoflife/ncursesoflife.6 b/games/ncursesoflife/ncursesoflife.6
new file mode 100644
index 000000000000..6ea5f05031c3
--- /dev/null
+++ b/games/ncursesoflife/ncursesoflife.6
@@ -0,0 +1,97 @@
+.\" Man page generated from reStructuredText.
+.
+.TH NCURSESOFLIFE 6 "2020-11-12" "20141006_0ceeca7" "SlackBuilds.org"
+.SH NAME
+ncursesoflife \- console Conway's Game of Life simulator
+.
+.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 ncursesoflife(1) man page. Convert with:
+.
+.\" rst2man.py ncursesoflife.rst > ncursesoflife.6
+.
+.\" rst2man.py comes from the SBo development/docutils package.
+.
+.\" converting from pod:
+.
+.\" s/B<\([^>]*\)>/**\1**/g
+.
+.\" s/I<\([^>]*\)>/*\1*/g
+.
+.SH SYNOPSIS
+.sp
+ncursesoflife
+.SH DESCRIPTION
+.sp
+ncursesoflife is a simple Conway\(aqs Life simulator, with the ability
+to draw your own patterns and run the simulation one step at a time
+or continuously.
+.sp
+There are no command\-line options or arguments.
+.SH CONTROLS
+.sp
+SIM stage:
+.INDENT 0.0
+.TP
+.B \fBp\fP
+play/pause
+.TP
+.B \fBn\fP
+step
+.TP
+.B \fB+\fP
+faster
+.TP
+.B \fB\-\fP
+slower
+.TP
+.B \fBq\fP
+quit
+.UNINDENT
+.sp
+WHEN PAUSED:
+.INDENT 0.0
+.TP
+.B \fBw\fP \fBa\fP \fBs\fP \fBd\fP, \fBarrow keys\fP
+move
+.TP
+.B \fBspace\fP
+toggle cell
+.UNINDENT
+.sp
+Game starts out paused. All SIM keystrokes will work when paused (step only works paused).
+.SH AUTHORS
+.sp
+ncursesoflife was written by AftExploision.
+.sp
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+.SH SEE ALSO
+.sp
+The ncursesoflife homepage: \fI\%https://github.com/AftExploision/NcursesOfLife\fP
+.\" Generated by docutils manpage writer.
+.
diff --git a/games/ncursesoflife/ncursesoflife.SlackBuild b/games/ncursesoflife/ncursesoflife.SlackBuild
new file mode 100644
index 000000000000..f308c97eca0b
--- /dev/null
+++ b/games/ncursesoflife/ncursesoflife.SlackBuild
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# Slackware build script for ncursesoflife
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=ncursesoflife
+VERSION=${VERSION:-20141006_0ceeca7}
+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
+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 {} \+
+
+# compile binary, stripped, directly to $PKG
+sed -i "/^CFLAGS/s|-g|$SLKCFLAGS -Wl,-s|" makefile
+mkdir -p $PKG/usr/games
+make OUT=$PKG/usr/games/$PRGNAM
+
+# man page by SlackBuild author
+mkdir -p $PKG/usr/man/man6
+gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README* $PKG/usr/doc/$PRGNAM-$VERSION
+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/ncursesoflife/ncursesoflife.info b/games/ncursesoflife/ncursesoflife.info
new file mode 100644
index 000000000000..bdd928664cf4
--- /dev/null
+++ b/games/ncursesoflife/ncursesoflife.info
@@ -0,0 +1,10 @@
+PRGNAM="ncursesoflife"
+VERSION="20141006_0ceeca7"
+HOMEPAGE="https://github.com/AftExploision/NcursesOfLife"
+DOWNLOAD="https://slackware.uk/~urchlay/src/ncursesoflife-20141006_0ceeca7.tar.xz"
+MD5SUM="4da4cd38e00515c76a11f7be68a7c0a9"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/games/ncursesoflife/ncursesoflife.rst b/games/ncursesoflife/ncursesoflife.rst
new file mode 100644
index 000000000000..97b8654062f0
--- /dev/null
+++ b/games/ncursesoflife/ncursesoflife.rst
@@ -0,0 +1,80 @@
+.. RST source for ncursesoflife(1) man page. Convert with:
+.. rst2man.py ncursesoflife.rst > ncursesoflife.6
+.. rst2man.py comes from the SBo development/docutils package.
+
+.. |version| replace:: 20141006_0ceeca7
+.. |date| date::
+
+.. converting from pod:
+.. s/B<\([^>]*\)>/**\1**/g
+.. s/I<\([^>]*\)>/*\1*/g
+
+=============
+ncursesoflife
+=============
+
+---------------------------------------
+console Conway's Game of Life simulator
+---------------------------------------
+
+:Manual section: 6
+:Manual group: SlackBuilds.org
+:Date: |date|
+:Version: |version|
+
+SYNOPSIS
+========
+
+ncursesoflife
+
+DESCRIPTION
+===========
+
+ncursesoflife is a simple Conway's Life simulator, with the ability
+to draw your own patterns and run the simulation one step at a time
+or continuously.
+
+There are no command-line options or arguments.
+
+CONTROLS
+========
+
+SIM stage:
+
+**p**
+ play/pause
+
+**n**
+ step
+
+**+**
+ faster
+
+**-**
+ slower
+
+**q**
+ quit
+
+WHEN PAUSED:
+
+**w** **a** **s** **d**, **arrow keys**
+ move
+
+**space**
+ toggle cell
+
+Game starts out paused. All SIM keystrokes will work when paused (step only works paused).
+
+AUTHORS
+=======
+
+ncursesoflife was written by AftExploision.
+
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+
+SEE ALSO
+========
+
+The ncursesoflife homepage: https://github.com/AftExploision/NcursesOfLife
diff --git a/games/ncursesoflife/slack-desc b/games/ncursesoflife/slack-desc
new file mode 100644
index 000000000000..b11156d07feb
--- /dev/null
+++ b/games/ncursesoflife/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------------------------------------------------------|
+ncursesoflife: ncursesoflife (console Conway's Game of Life)
+ncursesoflife:
+ncursesoflife: ncursesoflife is a simple Conway's Life simulator, with the ability
+ncursesoflife: to draw your own patterns and run the simulation one step at a time
+ncursesoflife: or continuously. It runs in a terminal and uses keyboard controls.
+ncursesoflife:
+ncursesoflife:
+ncursesoflife:
+ncursesoflife:
+ncursesoflife:
+ncursesoflife: