renamed archive file and convenience target for rpm
authorHarald Hoyer <harald@redhat.com>
Thu, 5 Mar 2009 09:17:29 +0000 (10:17 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 5 Mar 2009 09:18:46 +0000 (10:18 +0100)
Makefile

index f49068f..d7f0e44 100644 (file)
--- 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