From f2328f0f062ce649d1464413521499ef5ef135c1 Mon Sep 17 00:00:00 2001 From: Nathan Straz Date: Fri, 17 Apr 2009 16:11:09 -0400 Subject: Check Makefile to make an archive from git --- Makefile | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index cde5b0b..e14dc3c 100644 --- a/Makefile +++ b/Makefile @@ -39,22 +39,18 @@ ifdef DIST RPMDEFS := -D "dist $(DIST)" endif -tarfiles := qarsh.spec Makefile -tarfiles += $(wildcard *.c *.h) -tarfiles += qarsh.1 qacp.1 btimec.1 -tarfiles += qarshd.8 btimed.8 -tarfiles += *.xinetd +QARSH_TARNAME=qarsh-$(VERSION) -qarsh-$(VERSION).tar.bz2: $(tarfiles) - -rm $@ - tar cjf $@ $^ +$(QARSH_TARNAME).tar.bz2: qarsh.spec + git archive --format=tar --prefix=$(QARSH_TARNAME)/ HEAD^{tree} > $(QARSH_TARNAME).tar + bzip2 -f -9 $(QARSH_TARNAME).tar -tarball: qarsh-$(VERSION).tar.bz2 +tarball: $(QARSH_TARNAME).tar.bz2 -rpm: qarsh-$(VERSION).tar.bz2 qarsh.spec +rpm: $(QARSH_TARNAME).tar.bz2 qarsh.spec rpmbuild -ta $< $(RPMDEFS) -srpm: qarsh-$(VERSION).tar.bz2 qarsh.spec +srpm: $(QARSH_TARNAME).tar.bz2 qarsh.spec rpmbuild -ts $< $(RPMDEFS) # Redefine the default compile rule to include target specific parts -- cgit