diff options
-rw-r--r-- | Makefile | 41 |
1 files changed, 18 insertions, 23 deletions
@@ -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" |