]> thyrsus.com Git - bs.git/commitdiff
Made this RPM-ready.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 6 Dec 1995 03:58:08 +0000 (03:58 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 6 Dec 1995 03:58:08 +0000 (03:58 +0000)
Makefile

index 46341632de3c91e5319ff09ebe61e660d10c4f96..0807677d643c8ca645b91c99b50f04748bb46e39 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,15 @@
 #      Makefile for bs, the Battleships game
 
+# Note: When the version changes, you also have to change
+#  * the name of the containing directory
+#  * the RPM spec file
+V=2.1
+
 # Flags for use with the Linux ncurses package (recommended)
-CFLAGS = -DNCURSES  -I/usr/local/include -L/usr/local/lib
 TERMLIB = -lncurses
 CC = gcc
 
 # Flags for use with stock curses
-# CFLAGS =
 # TERMLIB = -lcurses
 # CC = gcc
 
@@ -19,9 +22,16 @@ lint:
 clean:
        rm -f bs bs.shar bs.tar.gz *~
 
+SOURCES = READ.ME bs.c Makefile bs.6 bs.lsm bs.spec
+
 bs.shar:
-       shar READ.ME bs.c Makefile bs.6 >bs.shar
+       shar $(SOURCES) >bs.shar
 
 bs.tar.gz:
-       tar -cvf bs.tar READ.ME bs.c Makefile bs.6 bs.lsm
+       (cd ..; tar -cvf bs-$(V)/bs.tar `echo $(SOURCES) | sed "/ /s// bs-$(V)\//g"`)
        gzip bs.tar
+
+rpm: bs.tar.gz
+       cp bs.tar.gz /usr/src/SOURCES/bs-$(V).tar.gz
+       cp bs.spec /usr/src/SPECS/bs-$(V)-1.spec
+       rpm -ba bs-$(V)-1.spec