]> thyrsus.com Git - tetrix.git/commitdiff
RPM packaging fixes.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 29 Dec 2003 19:53:07 +0000 (19:53 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 29 Dec 2003 19:53:07 +0000 (19:53 +0000)
Makefile

index 37c21a1976a5b7ebd75eaa2054a595f11b745a70..a81475c9ab7d47b336f0a312b1fd117fc5f3454f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,16 +6,13 @@
 #  - this will create a high score file in /usr/tmp, so doing it again
 #    later on will erase high scores for the machine.
 
-# Don't forget to change the spec file when you bump the version number.
-VERS=2.1
+VERS=$(shell sed <tetrix.spec -n -e '/Version: \(.*\)/s//\1/p')
 
 CFLAGS=-O -DIBM
 LFLAGS = -s
 OBJS= MoveR.o MoveL.o DrawP.o AdvanceP.o Rotate.o Colors.o tet.o
 INCS= tet.h
 
-SOURCES = 
-
 tetrix: $(OBJS) $(INCS)
        cc $(LFLAGS) $(OBJS) -lncurses -o tetrix
 
@@ -40,7 +37,7 @@ uninstall:
 clean:
        rm -f tetrix tetrix.6 tetrix-*.rpm tetrix-*.tar.gz *~
 
-SOURCES = READ.ME COPYING tetrix.xml Makefile tet.h $(OBJS:.o=.c) tetrix.spec
+SOURCES = README COPYING tetrix.xml Makefile tet.h $(OBJS:.o=.c) tetrix.spec
 
 tetrix-$(VERS).tar.gz: $(SOURCES) tetrix.6
        @ls $(SOURCES) tetrix.6 | sed s:^:tetrix-$(VERS)/: >MANIFEST
@@ -49,13 +46,3 @@ tetrix-$(VERS).tar.gz: $(SOURCES) tetrix.6
        @(cd ..; rm tetrix-$(VERS))
 
 dist: tetrix-$(VERS).tar.gz
-
-RPMROOT=/usr/src/redhat
-RPM = rpm
-RPMFLAGS = -ba
-rpm: dist
-       cp tetrix-$(VERS).tar.gz $(RPMROOT)/SOURCES;
-       cp tetrix.spec $(RPMROOT)/SPECS
-       cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) tetrix.spec     
-       cp $(RPMROOT)/RPMS/`arch|sed 's/i[4-9]86/i386/'`/tetrix-$(VERS)*.rpm .
-       cp $(RPMROOT)/SRPMS/tetrix-$(VERS)*.src.rpm .