summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile18
1 files 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