From 7323a621761a7471311986c26492dea64e972638 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 5 Mar 2009 10:17:29 +0100 Subject: [PATCH] renamed archive file and convenience target for rpm --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f49068ff..d7f0e44b 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +VERSION=0.0 +GITVERSION=$(shell git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8) + modules.d/99base/switch_root: switch_root.c gcc -o modules.d/99base/switch_root switch_root.c @@ -16,4 +19,7 @@ clean: rm -f modules.d/99base/switch_root archive: - git archive --format=tar HEAD --prefix=dracut/ |bzip2 > dracut-$(shell git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8).tar.bz2 + git archive --format=tar HEAD --prefix=dracut-$(VERSION)-$(GITVERSION)/ |bzip2 > dracut-$(VERSION)-$(GITVERSION).tar.bz2 + +rpm: + rpmbuild --define "_sourcedir $$PWD" --define "_specdir $$PWD" --define "_builddir $$PWD" --define "_srcrpmdir $$PWD" --define "_rpmdir $$PWD" -ba dracut.spec