From 0736717bb732a0a1a4c8cd76eb3c4aeadf853f24 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 6 Dec 1995 13:59:13 +0000 Subject: [PATCH] Make this RPM-ready. --- Makefile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3a77b43..e6f1d07 100644 --- 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 -- 2.43.0