From 233d32177ee26bf3b81253dc20a6492efc6d2e2c Mon Sep 17 00:00:00 2001 From: Nate Straz Date: Wed, 31 Jan 2007 21:12:03 +0000 Subject: Add the ability to tag builds for different distros. Just create the source rpm with "make srpm DIST=.el5" and build it with brew. --- Makefile | 9 +++++++-- qarsh.spec | 2 +- 2 files changed, 8 insertions(+), 3 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 diff --git a/qarsh.spec b/qarsh.spec index 1a8b8d4..1c9dd68 100644 --- a/qarsh.spec +++ b/qarsh.spec @@ -1,7 +1,7 @@ Summary: QA Remote Shell Name: qarsh Version: 1.12 -Release: 1 +Release: 1%{?dist} Group: QA License: GPL Buildroot: %{_tmppath}/%{name}-%{version}-root -- cgit