From e4d48c6d55e7a3e794df7cb2434011729524abdf Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 26 Feb 2008 01:52:29 -0500 Subject: Modify some of the build-fu for git. --- Makefile | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b699b6eb..d96f4d37 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,9 @@ ROOT=/ SUPERUSER=root SUPERGROUP=root -VERSION=$(shell awk '/Version:/ { print $$2 }' initscripts.spec) -CVSTAG = r$(subst .,-,$(VERSION)) -CVSROOT = $(shell cat CVS/Root) - +VERSION := $(shell awk '/Version:/ { print $$2 }' initscripts.spec) +RELEASE := $(shell awk '/Release:/ { print $$2 }' initscripts.spec) +TAG=initscripts-$(VERSION)-$(RELEASE) mandir=/usr/share/man @@ -124,27 +123,23 @@ check: done changelog: - rcs2log -h redhat.com -r -b -r "-d>`awk '{ print $$1 ; exit }' ChangeLog `" > changenew - mv ChangeLog ChangeLog.old - cat changenew ChangeLog.old > ChangeLog - rm -f changenew + @rm -f ChangeLog + git-log --stat > ChangeLog clean: make clean -C src make clean -C po @rm -fv *~ changenew ChangeLog.old *gz -tag-archive: - @cvs -Q tag -F $(CVSTAG) - -create-archive: tag-archive - @rm -rf /tmp/initscripts - @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) initscripts || echo GRRRrrrrr -- ignore [export aborted] - @mv /tmp/initscripts /tmp/initscripts-$(VERSION) - @cd /tmp; tar --bzip2 -cSpf initscripts-$(VERSION).tar.bz2 initscripts-$(VERSION) - @rm -rf /tmp/initscripts-$(VERSION) - @cp /tmp/initscripts-$(VERSION).tar.bz2 . - @rm -f /tmp/initscripts-$(VERSION).tar.bz2 - @echo " " - @echo "The final archive is ./initscripts-$(VERSION).tar.bz2." - -archive: clean check tag-archive create-archive + +tag: + @git tag -a -m "Tag as $(TAG)" -f $(TAG) + @echo "Tagged as $(TAG)" + +archive: clean check tag changelog + @git-archive --format=tar --prefix=initscripts-$(VERSION)/ HEAD > initscripts-$(VERSION).tar + @mkdir -p initscripts-$(VERSION)/ + @cp ChangeLog initscripts-$(VERSION)/ + @tar --append -f initscripts-$(VERSION).tar initscripts-$(VERSION) + @bzip2 -f initscripts-$(VERSION).tar + @rm -rf initscripts-$(VERSION) + @echo "The archive is at initscripts-$(VERSION).tar.bz2" -- cgit v1.2.1