]> thyrsus.com Git - bs.git/commitdiff
Get the spec version number from the makefile.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 24 Dec 2003 21:36:02 +0000 (21:36 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 24 Dec 2003 21:36:02 +0000 (21:36 +0000)
Makefile

index 17a091625a5dda448305f3136c12754472f11c6f..1317b93e01d646bc9024ee9bfb7e6cdb9a94cac0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,11 @@
 #      Makefile for bs, the Battleships game
 
-# Note: When the version changes, you also have to change the RPM spec file
 VERSION=2.5
 
 # Flags for use with the Linux ncurses package (recommended)
 TERMLIB = -lncurses
 CC = gcc
 
-# Flags for use with stock curses
-# TERMLIB = -lcurses
-# CC = gcc
-
 bs: bs.c
        $(CC) $(CFLAGS) -o bs bs.c $(TERMLIB)
 
@@ -39,7 +34,7 @@ dist: bs-$(VERSION).tar.gz
 
 RPMROOT=/usr/src/redhat
 rpm: dist
-       rpmbuild -ta bs-$(VERS).tar.gz
+       rpmbuild --define 'myversion $(VERS)' -ta bs-$(VERS).tar.gz
        cp $(RPMROOT)/RPMS/*/bs-$(VERS)*.rpm .
        cp $(RPMROOT)/SRPMS/bs-$(VERS)*.src.rpm .