git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Niels Basjes <Niels@basjes.nl>
To: git@vger.kernel.org
Cc: Niels Basjes <niels@basjes.nl>
Subject: [PATCH] Build RPMs locally unless overruled in ~/.rpmmacros
Date: Mon, 30 Mar 2009 17:10:39 +0200	[thread overview]
Message-ID: <1238425839-6337-1-git-send-email-Niels@Basjes.nl> (raw)

From: Niels Basjes <niels@basjes.nl>

Signed-off-by: Niels Basjes <niels@basjes.nl>
---
 .gitignore |    1 +
 Makefile   |    8 +++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/.gitignore b/.gitignore
index 1c57d4c..2f2554b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -173,3 +173,4 @@ configure
 tags
 TAGS
 cscope*
+RPM_BUILDING
diff --git a/Makefile b/Makefile
index 7867eac..ad5a1f7 100644
--- a/Makefile
+++ b/Makefile
@@ -242,7 +242,13 @@ RM = rm -f
 TAR = tar
 FIND = find
 INSTALL = install
-RPMBUILD = rpmbuild
+RPMBUILDOPTS = $(shell if [ "`grep '^%_topdir' $(HOME)/.rpmmacros`" == "" ];        \
+                       then                                                         \
+                           mkdir -p RPM_BUILDING/{BUILD,RPMS,SOURCES,SPECS,SRPMS};  \
+                           echo '--define="_topdir `pwd`/RPM_BUILDING"' ;           \
+                       fi                                                           \
+                )
+RPMBUILD = rpmbuild $(RPMBUILDOPTS)
 TCL_PATH = tclsh
 TCLTK_PATH = wish
 PTHREAD_LIBS = -lpthread
-- 
1.6.1.3

             reply	other threads:[~2009-03-30 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-30 15:10 Niels Basjes [this message]
2009-04-02  6:47 ` [PATCH] Build RPMs locally unless overruled in ~/.rpmmacros Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1238425839-6337-1-git-send-email-Niels@Basjes.nl \
    --to=niels@basjes.nl \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).