summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2009-06-19 13:53:46 +0200
committerHarald Hoyer <harald@redhat.com>2009-06-19 13:59:11 +0200
commitf1bbaa64b505b56d4ed546096fadc6ace638c252 (patch)
tree6043f0a8ddd50285590bf5f95d586ded3a69ba54 /Makefile
parent78cd7629374a3a05a4d547d7bd88367f2b9e02ad (diff)
downloaddracut-f1bbaa64b505b56d4ed546096fadc6ace638c252.tar.gz
dracut-f1bbaa64b505b56d4ed546096fadc6ace638c252.tar.bz2
dracut-f1bbaa64b505b56d4ed546096fadc6ace638c252.zip
add target for "dist" and "gitrpm"0.1
"make gitrpm" creates an rpm from the last git checkin "make rpm" creates an rpm for the version tagged with $VERSION "make dist" creates a tarball for the version tagged with $VERSION
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e70f309c..ae4a9d4c 100644
--- a/Makefile
+++ b/Makefile
@@ -37,10 +37,20 @@ clean:
archive: dracut-$(VERSION)-$(GITVERSION).tar.bz2
+dist: dracut-$(VERSION).tar.bz2
+
+dracut-$(VERSION).tar.bz2:
+ git archive --format=tar $(VERSION) --prefix=dracut-$(VERSION)/ |bzip2 > dracut-$(VERSION).tar.bz2
+
dracut-$(VERSION)-$(GITVERSION).tar.bz2:
git archive --format=tar HEAD --prefix=dracut-$(VERSION)-$(GITVERSION)/ |bzip2 > dracut-$(VERSION)-$(GITVERSION).tar.bz2
-rpm: dracut-$(VERSION)-$(GITVERSION).tar.bz2
+
+rpm: dracut-$(VERSION).tar.bz2
+ rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" --define "_rpmdir $$PWD" -ba dracut.spec
+ rm -fr BUILD BUILDROOT
+
+gitrpm: dracut-$(VERSION)-$(GITVERSION).tar.bz2
rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" --define "_rpmdir $$PWD" --define "gittag $(GITVERSION)" -ba dracut.spec
rm -fr BUILD BUILDROOT