# 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
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
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
--- /dev/null
+ 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
+
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/)
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])
+++ /dev/null
-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.
--- /dev/null
+# 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