[nsnake/f20: 2/3] Update to 2.0.5

Christopher Meng cicku at fedoraproject.org
Thu Jul 10 07:03:07 UTC 2014


commit f4980fe503f92bc6b851c7610777f9e24bba3140
Author: Christopher Meng <i at cicku.me>
Date:   Thu Jul 10 15:02:23 2014 +0800

    Update to 2.0.5

 .gitignore                                     |    1 +
 df8e8e39d9de33be6ff725a53ab74a69129ce57c.patch |   95 ++++++++++++++++++++++++
 nsnake.6                                       |   63 ----------------
 nsnake.spec                                    |   25 ++++--
 sources                                        |    2 +-
 5 files changed, 113 insertions(+), 73 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 34ee9ad..b6434f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /nsnake-1.7.tar.gz
 /nsnake-2.0.0.tar.gz
+/nSnake-2.0.5.tar.gz
diff --git a/df8e8e39d9de33be6ff725a53ab74a69129ce57c.patch b/df8e8e39d9de33be6ff725a53ab74a69129ce57c.patch
new file mode 100644
index 0000000..8a5906d
--- /dev/null
+++ b/df8e8e39d9de33be6ff725a53ab74a69129ce57c.patch
@@ -0,0 +1,95 @@
+From df8e8e39d9de33be6ff725a53ab74a69129ce57c Mon Sep 17 00:00:00 2001
+From: Christopher Meng <cickumqt at 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
+
diff --git a/nsnake.spec b/nsnake.spec
index e7350cc..d643a1f 100644
--- a/nsnake.spec
+++ b/nsnake.spec
@@ -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 at cicku.me> - 2.0.5-1
+- Update to 2.0.5
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/sources b/sources
index c1ce8bc..d84538a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-afd01f6ae2774f8921135c8236524e38  nsnake-2.0.0.tar.gz
+86b5d7809d41618607d7f56251e2804b  nSnake-2.0.5.tar.gz


More information about the scm-commits mailing list