Update to 2.0.5

This commit is contained in:
Christopher Meng 2014-07-10 15:02:23 +08:00
parent 38ad4f2b4b
commit f4980fe503
5 changed files with 113 additions and 73 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/nsnake-1.7.tar.gz
/nsnake-2.0.0.tar.gz
/nSnake-2.0.5.tar.gz

View File

@ -0,0 +1,95 @@
From df8e8e39d9de33be6ff725a53ab74a69129ce57c Mon Sep 17 00:00:00 2001
From: Christopher Meng <cickumqt@gmail.com>
Date: Thu, 10 Jul 2014 14:37:50 +0800
Subject: [PATCH] Don't muddle up cflags and ldflags
CFLAGS != LDFLAGS, using PLATFORM as global is bad.
Also for that bin file, well, /usr/bin is pretty common now, I don't know why some distros still prefer /usr/games.
DESTDIR != PREFIX, please do NOT put them together
---
Makefile | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
index e8b5924..6136c5a 100644
--- a/Makefile
+++ b/Makefile
@@ -44,27 +44,24 @@ FILES = BUGS ChangeLog COPYING Doxyfile \
INSTALL.md Makefile README.md TODO
# Install dirs
-DESTDIR =
-PREFIX = $(DESTDIR)/usr
-
+PREFIX = /usr
EXEC_PREFIX = $(PREFIX)
DATAROOTDIR = $(PREFIX)/share
MANROOT = $(DATAROOTDIR)/man
-
-MANNUMBER = 6
-
-BINDIR = $(EXEC_PREFIX)/games
+BINDIR = $(EXEC_PREFIX)/bin
MANDIR = $(MANROOT)/man$(MANNUMBER)
+MANNUMBER = 6
MANFILE = $(PACKAGE).$(MANNUMBER)
MANPAGE = doc/man/$(MANFILE)
# Build info
+CFLAGS_PLATFORM =
+LDFLAGS_PLATFORM =
EXE = $(PACKAGE)
CDEBUG = -O2
-PLATFORM =
-CXXFLAGS = $(CDEBUG) -Wall -Wextra $(PLATFORM)
-LDFLAGS = -lncurses -liniparser $(PLATFORM)
+CXXFLAGS = $(CDEBUG) -Wall -Wextra $(CFLAGS_PLATFORM)
+LDFLAGS = -lncurses -liniparser $(LDFLAGS_PLATFORM)
INCLUDESDIR = -I"src/" -I"deps/"
LIBSDIR =
@@ -80,7 +77,7 @@ DEFINES = -DVERSION=\""$(VERSION)"\" \
# commander stuff
COMMANDERDIR = deps/commander
-COMMANDER_CFLAGS = -O2 -Wall -Wextra $(PLATFORM)
+COMMANDER_CFLAGS = -O2 -Wall -Wextra $(CFLAGS_PLATFORM)
COMMANDER_OBJS = $(COMMANDERDIR)/commander.o
# Distribution tarball
@@ -113,22 +110,22 @@ all: dirs $(EXE)
install: all
# Installing...
- $(MUTE)install -d -m 755 $(BINDIR)
- $(MUTE)install -m 755 bin/$(EXE) $(BINDIR)
+ $(MUTE)install -pdm755 $(DESTDIR)$(BINDIR)
+ $(MUTE)install -pm755 bin/$(EXE) $(DESTDIR)$(BINDIR)
-$(MUTE)cat $(MANPAGE) | sed -e "s|DATE|$(DATE)|g" -e "s|VERSION|$(VERSION)|g" >$(MANFILE)
- $(MUTE)install -d $(MANDIR)
- $(MUTE)install $(MANFILE) $(MANDIR)
+ $(MUTE)install -pdm755 $(DESTDIR)$(MANDIR)
+ $(MUTE)install -pm644 $(MANFILE) $(DESTDIR)$(MANDIR)
$(MUTE)rm -f $(MANFILE)
# $(PACKAGE) successfuly installed!
uninstall:
# Uninstalling...
- $(MUTE)rm -f $(BINDIR)/$(EXE)
- $(MUTE)rm -f $(MANDIR)/$(MANFILE)
+ $(MUTE)rm -f $(DESTDIR)$(BINDIR)/$(EXE)
+ $(MUTE)rm -f $(DESTDIR)$(MANDIR)/$(MANFILE)
purge: uninstall
# Purging configuration files...
- $(MUTE)rm -f $(MANDIR)/$(MANFILE)
+ $(MUTE)rm -f $(DESTDIR)$(MANDIR)/$(MANFILE)
$(EXE): $(OBJECTS) $(COMMANDER_OBJS)
# Linking...
--
1.9.3

View File

@ -1,63 +0,0 @@
.TH nsnake 6 "Tue, 14 May 2013" v1.7 "nSnake v1.7"
.SH NAME
nsnake \- A snake game clone with nCurses
.SH SYNOPSIS
nsnake
.RB [ -h ]
.RB [ -l ]
.RB [ -v ]
.RB [ -r ]
.SH DESCRIPTION
nSnake is a implementation of the classic snake game with textual interface.
It is playable at command-line and uses the nCurses C library for graphics.
The rules are the same of any snake game:
.PP
You control a hungry snake and the objective is to eat as many fruits you can.
Each fruit eaten increases it's size by two units.
.PP
The game ends when the snake collides with the walls or itself. Currently,
nSnake has two modes: With Borders and without borders.
.PP
The challenge is to earn the biggest score possible by eating as many fruits as
you can.
.B Controls:
.RS
Numbers (1~9) Changes the game speed at the main menu
Arrow Keys, WASD, hjkl Moves the snake
q Quits the game at any time
p Pauses/Unpauses the game
.RE
.SH OPTIONS
.TP
.B "-h, --help"
Displays the quick help text.
.TP
.B "-l, --license"
Displays the program license and warranty.
.TP
.B "-v, --version"
Displays the version and general information.
.TP
.B "-r, --reset-scores"
Resets all the Highscores to default.
.SH BUGS
If you find a bug, please email me at <alex.dantas92@gmail.com>.
.SH AUTHOR
This manual page and nSnake were both written by Alexandre Dantas <alex.dantas92@gmail.com>.

View File

@ -1,12 +1,14 @@
Name: nsnake
Version: 2.0.0
Release: 2%{?dist}
Summary: Classic snake game on console
Version: 2.0.5
Release: 1%{?dist}
Summary: The classic snake game with textual interface
URL: http://nsnake.alexdantas.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
#Source1: %{name}.6
Source0: https://github.com/alexdantas/nSnake/archive/v%{version}.tar.gz#/nSnake-%{version}.tar.gz
# Half finished patch, ONLY works.
Patch0: https://github.com/cicku/nSnake/commit/df8e8e39d9de33be6ff725a53ab74a69129ce57c.patch
License: GPLv3+
BuildRequires: doxygen
BuildRequires: iniparser-devel
BuildRequires: ncurses-devel
%description
@ -14,20 +16,25 @@ nSnake is a implementation of the classic snake game with textual interface.
It is playable at command-line and uses the nCurses C library for graphics.
%prep
%setup -q
%setup -qn nSnake-%{version}
%patch0 -p1
%build
make CFLAGS="%{optflags}" %{?_smp_mflags}
make CFLAGS_PLATFORM="%{optflags}" LDFLAGS_PLATFORM="%{?__global_ldflags}" V=1 %{?_smp_mflags}
make doc
%install
install -pDm755 bin/%{name} %{buildroot}%{_bindir}/%{name}
%make_install
%files
%doc BUGS ChangeLog COPYING README.md TODO
%doc AUTHORS BUGS ChangeLog COPYING README.md TODO
%{_bindir}/%{name}
%{_mandir}/man6/nsnake.6*
%changelog
* Wed Jun 11 2014 Christopher Meng <rpm@cicku.me> - 2.0.5-1
- Update to 2.0.5
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

View File

@ -1 +1 @@
afd01f6ae2774f8921135c8236524e38 nsnake-2.0.0.tar.gz
86b5d7809d41618607d7f56251e2804b nSnake-2.0.5.tar.gz