]> thyrsus.com Git - galaxis.git/commitdiff
Make this RPM-ready.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 6 Dec 1995 13:59:13 +0000 (13:59 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 6 Dec 1995 13:59:13 +0000 (13:59 +0000)
Makefile

index 3a77b434f0bfe6739d393c26eaa04691fa18640a..e6f1d07e29ed5377790c2d2143939a556770e604 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,12 @@
 #      Makefile for the galaxis game
 
+# Note: When the version changes, you also have to change
+#  * the name of the containing directory
+#  * the RPM spec file
+V=1.1
+
 # Flags for use with the Linux ncurses package (recommended)
-CFLAGS = -g -DNDEBUG  -I/usr/local/include -L/usr/local/lib
+CFLAGS = -g -DNDEBUG  # -I/usr/local/include -L/usr/local/lib
 TERMLIB = -lncurses
 CC = gcc
 
@@ -16,11 +21,16 @@ galaxis: galaxis.c
 clean:
        rm -f galaxis galaxis.shar *~
 
-SOURCES = READ.ME galaxis.c Makefile galaxis.6 galaxis.lsm
+SOURCES = READ.ME galaxis.c Makefile galaxis.6 galaxis.lsm galaxis.spec
 
 galaxis.shar:
        shar $(SOURCES) >galaxis.shar
 
 galaxis.tar.gz:
-       tar -cvf galaxis.tar $(SOURCES)
-       gzip galaxis.tar
+       (cd ..; tar -cvf galaxis-$(V)/galaxis.tar `echo $(SOURCES) | sed "/\(^\| \)/s// galaxis-$(V)\//g"`)
+       gzip -f galaxis.tar
+
+rpm: galaxis.tar.gz
+       cp galaxis.tar.gz /usr/src/SOURCES/galaxis-$(V).tar.gz
+       cp galaxis.spec /usr/src/SPECS/galaxis-$(V)-1.spec
+       rpm -ba galaxis-$(V)-1.spec