* Yes-no confirmations and "press-to-continue" situations should print
a recognizable standard prompt.
-* A real release, with downloadable tarballs and RPMs and so forth.
-
* The time machine switch. Specify a year, get only the features that
then existed. (This would be partly so people can try the original
non-"super" version Matuszek and Reynolds wrote.)
-CFLAGS= -O -g -DSSTDOC='"sst.doc"'
+# Makefile for the Super Star Trek game
+
+VERS=$(shell sed <sst.spec -n -e '/Version: \(.*\)/s//\1/p')
+
+CFLAGS= -O -g -DSSTDOC='"/usr/share/doc/sst/sst.doc"'
.c.o:
$(CC) $(CFLAGS) -c $<
CFILES= sst.c finish.c reports.c setup.c linux.c moving.c battle.c events.c ai.c planets.c
OFILES= $(CFILES:.c=.o)
-HFILES=sst.h
+HFILES=sst.h
+DOC = sst-doc.xml sst.xml TODO
-SOURCES= $(CFILES) $(HFILES) sst-doc.xml TODO makehelp.py makefile sst.xml
+# sst.doc and sst.6 are included so target system won't need xmlto
+SOURCES= $(CFILES) $(HFILES) $(DOC) sst.doc sst.6 makehelp.py makefile sst.spec
all: sst sst.doc
sst.doc: sst-doc.txt
makehelp.py >sst.doc
+sst-doc.html: sst-doc.xml
+ xmlto --skip-validation xhhtml-nochunks sst-doc.xml
+
+install: sst.6 uninstall
+ install -m 755 -o 0 -g 0 -d $(ROOT)/usr/bin/
+ install -m 755 -o 0 -g 0 sst $(ROOT)/usr/bin/sst
+ install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man6/
+ install -m 755 -o 0 -g 0 sst.6 $(ROOT)/usr/share/man/man6/sst.6
+ mkdir -p /usr/share/doc/sst/
+ install -m 644 -o 0 -g 0 sst.doc $(ROOT)/usr/share/doc/sst/
+ install -m 644 -o 0 -g 0 sst-doc.html $(ROOT)/usr/share/doc/sst/index.html
+
+uninstall:
+ rm -f ${ROOT}/usr/bin/sst ${ROOT}/usr/share/man/man6/sst.6
+ rm -fr ${ROOT}/usr/share/doc/sst/
+
clean:
- rm -f *.o sst sst-doc.txt sst.doc
+ rm -f *.o sst sst-doc.html sst-doc.txt sst.doc
+
+# The "trunk" below assumes this is a Subversion working copy
+sst-$(VERS).tar.gz: $(SOURCES) sst.6
+ ls $(SOURCES) sst.6 | sed s:^:sst-$(VERS)/: >MANIFEST
+ (cd ..; ln -s trunk sst-$(VERS))
+ (cd ..; tar -czvf trunk/sst-$(VERS).tar.gz `cat trunk/MANIFEST`)
+ (cd ..; rm sst-$(VERS))
+
+dist: sst-$(VERS).tar.gz
+release: sst-$(VERS).tar.gz sst.html
+ shipper -f; rm -f CHANGES ANNOUNCE* *.6 *.html *.rpm *.lsm MANIFEST
<command>sst</command> in a terminal window to start it. Typing
'comands' at the prompt will list all commands; help is available for
each one individually as well. Full documentation is <ulink
-url='http://sst.berlios.de/sst-doc.html'>browseable</ulink>.</para>
+url='http://sst.berlios.de/sst-doc.html'>browseable</ulink>. On
+systems where <filename>/usr/share/doc/sst/</filename> is a legal
+filename, it will probably be installed there as well.</para>
</refsect1>
<refsect1 id='authors'><title>AUTHORS</title> <para>Super Star Trek
was designed and written by David Matuszek, Paul Reynolds, and Don
Smith in the 1970s. It was resurrected by Tom Almy. This version has
been cleaned up and documented by Eric S. Raymond
-<esr@snark.thyrsus.com>. There is a <ulink
+<email>esr@snark.thyrsus.com</email>. There is a <ulink
url='https://developer.berlios.de/projects/sst/'>project
page</ulink>.</para>
</refsect1>