summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d04ce64..ee94fde 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,11 @@ clean:
$(RM) $(TARGETS)
VERSION := $(shell awk '/^Version:/ { print $$2 }' qarsh.spec)
+
+ifdef DIST
+ RPMDEFS := -D "dist $(DIST)"
+endif
+
qarsh-$(VERSION).tar.bz2: qarsh.spec
-rm $@
tar cjf $@ .
@@ -36,10 +41,10 @@ qarsh-$(VERSION).tar.bz2: qarsh.spec
tarball: qarsh-$(VERSION).tar.bz2
rpm: qarsh-$(VERSION).tar.bz2 qarsh.spec
- rpmbuild -ta $<
+ rpmbuild -ta $< $(RPMDEFS)
srpm: qarsh-$(VERSION).tar.bz2 qarsh.spec
- rpmbuild -ts $<
+ rpmbuild -ts $< $(RPMDEFS)
# Redefine the default compile rule to include target specific parts
%: %.c