aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-03-03 10:39:57 -0500
committerBill Nottingham <notting@redhat.com>2008-03-03 10:39:57 -0500
commit8b1672cd138cca0e60bccdc6317f5ad4dff16d4c (patch)
tree3ab6f7d046ab35be549ee3ac268d61c0485f5fc8
parentf9aae940a735d963c8f0e1b02be0866f0746e4c8 (diff)
downloadinitscripts-8.45.19.EL-1.tar
initscripts-8.45.19.EL-1.tar.gz
initscripts-8.45.19.EL-1.tar.bz2
initscripts-8.45.19.EL-1.tar.xz
initscripts-8.45.19.EL-1.zip
backport makefile-fu for gitinitscripts-8.45.19.EL-1
-rw-r--r--Makefile43
1 files changed, 18 insertions, 25 deletions
diff --git a/Makefile b/Makefile
index 76bfe07d..93683c90 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)
ARCH = $(shell uname -m)
mandir=/usr/share/man
@@ -117,29 +116,23 @@ check:
done
changelog:
- # rcs2log -r '-rrhel5-branch -S' would be correct, if elvis would have a recent cvs server version
- @rcs2log -r '-rrhel5-branch' | sed "s|@.*redhat\.com|@redhat.com|" | sed "s|@.*redhat\.de|@redhat.com|" | sed "s|@redhat\.de|@redhat.com|" | sed "s|@@|@|" | \
- sed "s|/usr/local/CVS/initscripts/||g" | sed "s|/cvs/rhl/initscripts/||g" > 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"