From 58ed324cb49a2961f40418b95d60763125ebb11a Mon Sep 17 00:00:00 2001 From: Björn Esser Date: Dec 05 2014 11:47:35 +0000 Subject: updated to new snapshot added Patch0 to have manpages --- diff --git a/2048-cli-0.8_add-manpage.patch b/2048-cli-0.8_add-manpage.patch new file mode 100644 index 0000000..21b3de9 --- /dev/null +++ b/2048-cli-0.8_add-manpage.patch @@ -0,0 +1,369 @@ +From 986bb70d9b5fad68752dd5851419d06cef952519 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Fri, 5 Dec 2014 10:53:56 +0100 +Subject: [PATCH] add manpage + +--- + Makefile | 19 +++++++++--- + man/2048.1 | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + man/2048.1.txt | 62 ++++++++++++++++++++++++++++++++++++++ + man/2048nc.1 | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++ + man/2048nc.1.txt | 58 +++++++++++++++++++++++++++++++++++ + 5 files changed, 309 insertions(+), 4 deletions(-) + create mode 100644 man/2048.1 + create mode 100644 man/2048.1.txt + create mode 100644 man/2048nc.1 + create mode 100644 man/2048nc.1.txt + +diff --git a/Makefile b/Makefile +index 4a0378b..4ba965f 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,9 @@ +-CC ?= gcc +-CFLAGS += -Wall -Wextra +-LIBS = -lcurses ++ASCIIDOC ?= a2x ++CC ?= gcc ++CFLAGS := -Wall -Wextra $(CFLAGS) ++LIBS = -lcurses + +-all: 2048 ++.PHONY: clean man man-nc + + 2048: src/2048.c + $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) src/2048.c -o 2048 +@@ -10,5 +11,15 @@ all: 2048 + 2048nc: src/2048.c + $(CC) -DNO_CURSES=1 $(CFLAGS) $(LDFLAGS) src/2048.c -o 2048nc + ++all: 2048 ++ + clean: + rm -f 2048 2048nc ++ ++man: ++ rm -f man/2048.1 ++ $(ASCIIDOC) -d manpage -f manpage man/2048.1.txt ++ ++man-nc: ++ rm -f man/2048nc.1 ++ $(ASCIIDOC) -d manpage -f manpage man/2048nc.1.txt +diff --git a/man/2048.1 b/man/2048.1 +new file mode 100644 +index 0000000..e1448f5 +--- /dev/null ++++ b/man/2048.1 +@@ -0,0 +1,92 @@ ++'\" t ++.\" Title: \e20\e4\e8 ++.\" Author: [see the "AUTHOR" section] ++.\" Generator: DocBook XSL Stylesheets v1.78.1 ++.\" Date: 12/05/2014 ++.\" Manual: \ \& ++.\" Source: \ \& ++.\" Language: English ++.\" ++.TH "\E20\E4\E8" "1" "12/05/2014" "\ \&" "\ \&" ++.\" ----------------------------------------------------------------- ++.\" * Define some portability stuff ++.\" ----------------------------------------------------------------- ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.\" http://bugs.debian.org/507673 ++.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ----------------------------------------------------------------- ++.\" * set default formatting ++.\" ----------------------------------------------------------------- ++.\" disable hyphenation ++.nh ++.\" disable justification (adjust text to left margin only) ++.ad l ++.\" ----------------------------------------------------------------- ++.\" * MAIN CONTENT STARTS HERE * ++.\" ----------------------------------------------------------------- ++.SH "NAME" ++2048 \- The game 2048 for your Linux terminal ++.SH "SYNOPSIS" ++.sp ++\fB2048\fR [\fIOPTIONS\fR] ++.SH "DESCRIPTION" ++.sp ++A cli version of the game 2048 for your Linux terminal\&. ++.SH "OPTIONS" ++.PP ++\fB\-s\fR \fIsize\fR ++.RS 4 ++Set the grid border length to ++\fIsize\fR\&. ++.RE ++.PP ++\fB\-b\fR \fIrate\fR ++.RS 4 ++Set the block spawn rate to ++\fIrate\fR\&. ++.RE ++.PP ++\fB\-r\fR ++.RS 4 ++Resets hiscore\&. Will prompt user\&. ++.RE ++.PP ++\fB\-c\fR ++.RS 4 ++Enables color support\&. ++.RE ++.PP ++\fB\-C\fR ++.RS 4 ++Disables color support\&. ++.RE ++.PP ++\fB\-h\fR ++.RS 4 ++Display usage information\&. ++.RE ++.SH "CONTROLS" ++.PP ++\fBhjkl or *wasd\fR or \fBarrow keys\fR ++.RS 4 ++Movement ++.RE ++.PP ++\fBq\fR ++.RS 4 ++Quit the game\&. ++.RE ++.SH "AUTHOR" ++.sp ++2048 was originally written by Thiehuis\&. Some people have contributed to it\&. ++.sp ++This manpage is Copyright (C) 2014 Björn Esser and licensed under the terms of the MIT License (MIT)\&. ++.SH "RESOURCES" ++.sp ++github: https://github\&.com/Tiehuis/2048\-cli/ ++.SH "COPYING" ++.sp ++Copyright (C) 2014 Tiehuis\&. Free use of this software is granted under the terms of the MIT License (MIT)\&. +diff --git a/man/2048.1.txt b/man/2048.1.txt +new file mode 100644 +index 0000000..50754fe +--- /dev/null ++++ b/man/2048.1.txt +@@ -0,0 +1,62 @@ ++\20\4\8(1) ++=========== ++:doctype: manpage ++ ++ ++NAME ++---- ++2048 - The game 2048 for your Linux terminal ++ ++ ++SYNOPSIS ++-------- ++*2048* ['OPTIONS'] ++ ++ ++DESCRIPTION ++----------- ++A cli version of the game 2048 for your Linux terminal. ++ ++ ++OPTIONS ++------- ++*-s* 'size':: ++ Set the grid border length to 'size'. ++*-b* 'rate':: ++ Set the block spawn rate to 'rate'. ++*-r*:: ++ Resets hiscore. Will prompt user. ++*-c*:: ++ Enables color support. ++*-C*:: ++ Disables color support. ++*-h*:: ++ Display usage information. ++ ++ ++CONTROLS ++-------- ++*hjkl or *wasd* or *arrow keys*:: ++ Movement ++*q*:: ++ Quit the game. ++ ++ ++AUTHOR ++------ ++2048 was originally written by Thiehuis. Some people have ++contributed to it. ++ ++This manpage is Copyright \(C) 2014 Björn Esser and licensed ++under the terms of the MIT License (MIT). ++ ++ ++RESOURCES ++--------- ++github: ++ ++ ++COPYING ++------- ++Copyright \(C) 2014 Tiehuis. Free use of this software is ++granted under the terms of the MIT License (MIT). +diff --git a/man/2048nc.1 b/man/2048nc.1 +new file mode 100644 +index 0000000..d0151de +--- /dev/null ++++ b/man/2048nc.1 +@@ -0,0 +1,82 @@ ++'\" t ++.\" Title: \e20\e4\e8nc ++.\" Author: [see the "AUTHOR" section] ++.\" Generator: DocBook XSL Stylesheets v1.78.1 ++.\" Date: 12/05/2014 ++.\" Manual: \ \& ++.\" Source: \ \& ++.\" Language: English ++.\" ++.TH "\E20\E4\E8NC" "1" "12/05/2014" "\ \&" "\ \&" ++.\" ----------------------------------------------------------------- ++.\" * Define some portability stuff ++.\" ----------------------------------------------------------------- ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.\" http://bugs.debian.org/507673 ++.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ----------------------------------------------------------------- ++.\" * set default formatting ++.\" ----------------------------------------------------------------- ++.\" disable hyphenation ++.nh ++.\" disable justification (adjust text to left margin only) ++.ad l ++.\" ----------------------------------------------------------------- ++.\" * MAIN CONTENT STARTS HERE * ++.\" ----------------------------------------------------------------- ++.SH "NAME" ++2048nc \- The game 2048 for your Linux terminal ++.SH "SYNOPSIS" ++.sp ++\fB2048nc\fR [\fIOPTIONS\fR] ++.SH "DESCRIPTION" ++.sp ++A non\-ncurses cli version of the game 2048 for your Linux terminal\&. ++.SH "OPTIONS" ++.PP ++\fB\-s\fR \fIsize\fR ++.RS 4 ++Set the grid border length to ++\fIsize\fR\&. ++.RE ++.PP ++\fB\-b\fR \fIrate\fR ++.RS 4 ++Set the block spawn rate to ++\fIrate\fR\&. ++.RE ++.PP ++\fB\-r\fR ++.RS 4 ++Resets hiscore\&. Will prompt user\&. ++.RE ++.PP ++\fB\-h\fR ++.RS 4 ++Display usage information\&. ++.RE ++.SH "CONTROLS" ++.PP ++\fBhjkl\fR or \fBwasd\fR ++.RS 4 ++Movement ++.RE ++.PP ++\fBq\fR ++.RS 4 ++Quit the game\&. ++.RE ++.SH "AUTHOR" ++.sp ++2048nc was originally written by Thiehuis\&. Some people have contributed to it\&. ++.sp ++This manpage is Copyright (C) 2014 Björn Esser and licensed under the terms of the MIT License (MIT)\&. ++.SH "RESOURCES" ++.sp ++github: https://github\&.com/Tiehuis/2048\-cli/ ++.SH "COPYING" ++.sp ++Copyright (C) 2014 Tiehuis\&. Free use of this software is granted under the terms of the MIT License (MIT)\&. +diff --git a/man/2048nc.1.txt b/man/2048nc.1.txt +new file mode 100644 +index 0000000..a961892 +--- /dev/null ++++ b/man/2048nc.1.txt +@@ -0,0 +1,58 @@ ++\20\4\8nc(1) ++=========== ++:doctype: manpage ++ ++ ++NAME ++---- ++2048nc - The game 2048 for your Linux terminal ++ ++ ++SYNOPSIS ++-------- ++*2048nc* ['OPTIONS'] ++ ++ ++DESCRIPTION ++----------- ++A non-ncurses cli version of the game 2048 for your Linux terminal. ++ ++ ++OPTIONS ++------- ++*-s* 'size':: ++ Set the grid border length to 'size'. ++*-b* 'rate':: ++ Set the block spawn rate to 'rate'. ++*-r*:: ++ Resets hiscore. Will prompt user. ++*-h*:: ++ Display usage information. ++ ++ ++CONTROLS ++-------- ++*hjkl* or *wasd*:: ++ Movement ++*q*:: ++ Quit the game. ++ ++ ++AUTHOR ++------ ++2048nc was originally written by Thiehuis. Some people have ++contributed to it. ++ ++This manpage is Copyright \(C) 2014 Björn Esser and licensed ++under the terms of the MIT License (MIT). ++ ++ ++RESOURCES ++--------- ++github: ++ ++ ++COPYING ++------- ++Copyright \(C) 2014 Tiehuis. Free use of this software is ++granted under the terms of the MIT License (MIT). diff --git a/2048-cli.spec b/2048-cli.spec index aff3113..a0127a7 100644 --- a/2048-cli.spec +++ b/2048-cli.spec @@ -1,12 +1,12 @@ # Conditional for release and snapshot builds. Uncomment for release-builds. -%global rel_build 1 +#global rel_build 1 # Setup _pkgdocdir if not defined already. %{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} # Settings used for build from snapshots. -%{!?rel_build:%global commit 2fef5a482227ef2b2189fcf2934d0ee132141115} -%{!?rel_build:%global commit_date 20141201} +%{!?rel_build:%global commit a9505d949e58dd6b5f00b85deb9d4de49e1e2ba5} +%{!?rel_build:%global commit_date 20141205} %{!?rel_build:%global shortcommit %(c=%{commit};echo ${c:0:7})} %{!?rel_build:%global gitver git%{commit_date}-%{shortcommit}} %{!?rel_build:%global gitrel .git%{commit_date}.%{shortcommit}} @@ -16,7 +16,7 @@ Name: 2048-cli Version: 0.8 -Release: 2%{?gitrel}%{?dist} +Release: 3%{?gitrel}%{?dist} Summary: The game 2048 for your Linux terminal %{?el5:Group: Amusements/Games} @@ -27,7 +27,12 @@ URL: https://github.com/Tiehuis/%{name} # Sources for snapshot-builds. %{!?rel_build:Source0: %{url}/archive/%{commit}.tar.gz#/%{gittar}} +Patch0: %{url}/pull/9.patch#/%{name}-%{version}_add-manpage.patch + %{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)} +BuildRequires: asciidoc +BuildRequires: docbook-style-xsl +BuildRequires: libxslt BuildRequires: ncurses-devel %description @@ -44,10 +49,11 @@ A non-ncurses cli version of the game 2048 for your Linux terminal. %prep %setup -q%{!?rel_build:n %{name}-%{commit}} +%patch0 -p1 %build -%{__make} %{?_smp_mflags} 2048 2048nc \ +%{__make} %{?_smp_mflags} 2048 2048nc man man-nc \ CFLAGS='%{optflags}' LDFLAGS='%{?__global_ldflags}' @@ -55,9 +61,13 @@ A non-ncurses cli version of the game 2048 for your Linux terminal. %{?el5:%{__rm} -rf %{buildroot}} # There is no install-target in Makefile. -%{__mkdir} -p %{buildroot}%{_bindir} %{buildroot}%{_pkgdocdir} +%{__mkdir} -p %{buildroot}%{_bindir} \ + %{buildroot}%{_mandir}/man1 \ + %{buildroot}%{_pkgdocdir} %{__install} -pm 0755 2048 2048nc %{buildroot}%{_bindir} -%{__install} -pm 0644 LICENSE README.md %{buildroot}%{_pkgdocdir} +%{__install} -pm 0644 man/*.1 %{buildroot}%{_mandir}/man1 +%{__install} -pm 0644 man/2048*.1.txt LICENSE README.md \ + %{buildroot}%{_pkgdocdir} %{?el5:%clean} @@ -67,13 +77,19 @@ A non-ncurses cli version of the game 2048 for your Linux terminal. %files %doc %{_pkgdocdir} %{_bindir}/2048 +%{_mandir}/man1/2048.1* %files nocurses %doc %{_pkgdocdir} %{_bindir}/2048nc +%{_mandir}/man1/2048nc.1* %changelog +* Fri Dec 05 2014 Björn Esser - 0.8-3.git20141205.a9505d9 +- updated to new snapshot git20141205.a9505d9 +- added Patch0 to have manpages + * Thu Dec 04 2014 Björn Esser - 0.8-2 - dropped Patch0 (#1170231) - some minor readability clean-up diff --git a/sources b/sources index 8813c64..5807016 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4fe9ab5b8ecbcc50edefee2e4de8c0e3 2048-cli-0.8.tar.gz +110d61b037df7bc0e3e165b0c68f2d9d 2048-cli-0.8-git20141205-a9505d9.tar.gz