]> thyrsus.com Git - bs.git/commitdiff
Packaging fixups, icon, history update, and one line of cppcheck cleanup.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 3 Dec 2012 12:30:52 +0000 (07:30 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 3 Dec 2012 12:30:52 +0000 (07:30 -0500)
Makefile
NEWS [new file with mode: 0644]
README
battleship.png [new file with mode: 0644]
bs.c
bs.spec [deleted file]
control [new file with mode: 0644]

index 412c7667fd815a0f5a4e20ff601ceb721b7c52e2..a266c9d1b25e18af6de0f7f312d56cdc325a5678 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 #      Makefile for bs, the Battleships game
 
-VERSION=$(shell sed <bs.spec -n -e '/Version: \(.*\)/s//\1/p')
+VERSION=2.9
 
 # Flags for use with the Linux ncurses package (recommended)
 TERMLIB = -lncurses
@@ -20,6 +20,9 @@ bs.html: bs.xml
 clean:
        rm -f bs bs.6 bs*.tar.gz bs*.rpm *~ *.html SHIPPER.*
 
+cppcheck:
+       cppcheck --template gcc --enable=all bs.c
+
 install: bs.6 uninstall
        cp bs $(DESTDIR)/usr/bin
        cp bs.6 $(DESTDIR)/usr/share/man/man6/bs.6
@@ -27,7 +30,7 @@ install: bs.6 uninstall
 uninstall:
        rm -f /usr/bin/bs /usr/share/man/man6/bs.6
 
-SOURCES = README COPYING bs.c Makefile bs.xml bs.spec
+SOURCES = README COPYING NEWS control bs.c Makefile bs.xml bs.png 
 
 bs-$(VERSION).tar.gz: $(SOURCES) bs.6
        @ls $(SOURCES) bs.6 | sed s:^:bs-$(VERSION)/: >MANIFEST
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..c59ab86
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,24 @@
+                       bs project news
+
+2.9 @ 2012-12-01
+  Packaging fixes.  Added icon. cppcheck cleanup.
+
+2.8 @ 2010-10-19
+  Port to modern C.
+
+2.7 @ 2003-12-29
+  Source RPMS no longer depend on --define myversion.
+
+2.6 @ 2003-12-26
+  Fix a broken URL in the documentation
+
+2.5 @ 2003-12-24
+  Improved packaging.
+
+ * v2.4 Update the RPM production.
+ * v2.3 bug fixes by Erik Sigra.
+ * v2.2 code cleanup.
+ * v2.1 with ncurses mouse support, September 1995
+ * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
+ * v1.2 with color support and minor portability fixes, November 1990
+ 
diff --git a/README b/README
index f21ebbd9fd8481be416c8219a2eafd10ce4c01e5..8e908fed1acb737cd8dbbdc7627a45bf18f79b8d 100644 (file)
--- a/README
+++ b/README
@@ -33,6 +33,14 @@ O.K., I feel better now that I've got that off my chest...
 
 November 1993: I've added function key support, and ANSI/POSIXized the code.
 
+December 2012: This is ancient code now, mainly interesting as a
+historical document of what primitive computer games looked like in
+the 1980s - the earliest commit is in the repo is from 1993, the
+oldest news item is from 1990, but I think I rewrote it sometime
+between 1987 and 1989.  The PNG icon in the distribution is much
+later; thanks to Tor Gjerde who seems to have built it for use with
+FVWM.
+
                                        Eric S. Raymond
                                        esr@snark.thyrsus.com
                                (WWW: http://www.catb.org/~esr/)
diff --git a/battleship.png b/battleship.png
new file mode 100644 (file)
index 0000000..b05f953
Binary files /dev/null and b/battleship.png differ
diff --git a/bs.c b/bs.c
index 07bc2d5b2537be7fee5c1f96a95fff3d6b265594..995ae0dce01f0ec83c550ada4a021b31cc456435 100644 (file)
--- a/bs.c
+++ b/bs.c
@@ -1154,10 +1154,11 @@ int playagain(void)
 
 static void do_options(int c, char *op[])
 {
-    register int i;
 
     if (c > 1)
     {
+       register int i;
+
        for (i=1; i<c; i++)
        {
            switch(op[i][0])
diff --git a/bs.spec b/bs.spec
deleted file mode 100644 (file)
index 0e94ae0..0000000
--- a/bs.spec
+++ /dev/null
@@ -1,57 +0,0 @@
-Name: bs
-Summary: Battleships against the computer (character-cell graphics)
-Version: 2.9
-Release: 1
-URL: http://www.catb.org/~esr/bs/
-Source0: %{name}-%{version}.tar.gz
-License: BSD
-Group: Games
-BuildRoot: %{_tmppath}/%{name}-root
-#Destinations: freshmeat
-#Project-Tag-List: battleships, game, solitaire
-
-%description
-The classic game of Battleships against the computer.
-Uses character-cell graphics with a visual point-and-shoot interface.
-If you're using an xterm under Linux the mouse will work.
-
-%prep
-%setup
-
-%build
-make %{?_smp_mflags} bs bs.6
-
-%install
-[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
-mkdir -p "$RPM_BUILD_ROOT"%{_bindir}
-mkdir -p "$RPM_BUILD_ROOT"%{_mandir}/man6/
-cp bs "$RPM_BUILD_ROOT"%{_bindir}
-cp bs.6 "$RPM_BUILD_ROOT"%{_mandir}/man6/
-
-%clean
-[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
-%files
-%defattr(-,root,root,-)
-%{_mandir}/man6/bs.6*
-%{_bindir}/bs
-%doc README COPYING
-
-%changelog
-* Tue Oct 19 2010 Eric S. Raymond <esr@snark.thyrsus.com> 2.8-1
-- Port to modern C.
-
-* Mon Dec 29 2003 Eric S. Raymond <esr@snark.thyrsus.com> 2.7-1
-- Source RPMS no longer depend on --define myversion.
-
-* Fri Dec 26 2003 Eric S. Raymond <esr@snark.thyrsus.com> 2.6-1
-- Fix a broken URL in the documentation
-
-* Wed Dec 24 2003 Eric S. Raymond <esr@snark.thyrsus.com> 2.5-1
-- Improved packaging.
-
- * v1.2 with color support and minor portability fixes, November 1990
- * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
- * v2.1 with ncurses mouse support, September 1995
- * v2.2 code cleanup.
- * v2.3 bug fixes by Erik Sigra.
- * v2.4 Update the RPM production.
diff --git a/control b/control
new file mode 100644 (file)
index 0000000..701b1f4
--- /dev/null
+++ b/control
@@ -0,0 +1,16 @@
+# This is not a real Debian control file
+# It's project metadata for the shipper tool
+
+Package: bs
+
+Description: The classic game of Battleships against the computer.
+ Uses character-cell graphics with a visual point-and-shoot interface.
+ If you're using an xterm under Linux the mouse will work.
+
+XBS-Destinations: freecode
+
+XBS-Logo: battleship.png 
+
+Homepage: http://www.catb.org/~esr/bs
+
+XBS-Project-Tag-List: Games/Entertainment