From: Niels Basjes <Niels@Basjes.nl>
To: git@vger.kernel.org
Cc: Niels Basjes <Niels@Basjes.nl>
Subject: [PATCH] Two RPM building improvements
Date: Fri, 27 Mar 2009 13:32:14 +0100 [thread overview]
Message-ID: <1238157134-27558-1-git-send-email-Niels@Basjes.nl> (raw)
Two RPM building improvements:
- Building the RPMs can now be done by a non-root user.
- The additional target all-rpms now builds the RPMs for a multitude of target platforms.
Signed-off-by: Niels Basjes <Niels@Basjes.nl>
---
.gitignore | 1 +
Makefile | 26 ++++++++++++++++++++++++--
2 files changed, 25 insertions(+), 2 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..d9f5e04 100644
--- a/Makefile
+++ b/Makefile
@@ -1564,7 +1564,29 @@ dist: git.spec git-archive$(X) configure
gzip -f -9 $(GIT_TARNAME).tar
rpm: dist
- $(RPMBUILD) -ta $(GIT_TARNAME).tar.gz
+ -@mkdir -p RPM_BUILDING/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+ $(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz
+ -@echo ""
+ -@echo "================================================================="
+ -@echo "Generated RPMS and SRPMS:"
+ -@find `pwd`/RPM_BUILDING/ -type f -name '$(distdir)*.rpm' | xargs -n 1 -iXXX echo "- XXX"
+ -@echo "================================================================="
+ -@echo ""
+
+all-rpms: dist
+ -@mkdir -p RPM_BUILDING/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+ $(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz --target i386
+ $(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz --target i686
+ $(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz --target x86_64
+ $(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz --target ia32
+ $(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz --target ppc
+ -@echo ""
+ -@echo "================================================================="
+ -@echo "Generated RPMS and SRPMS:"
+ -@find `pwd`/RPM_BUILDING/ -type f -name '$(distdir)*.rpm' | xargs -n 1 -iXXX echo "- XXX"
+ -@echo "================================================================="
+ -@echo ""
+
htmldocs = git-htmldocs-$(GIT_VERSION)
manpages = git-manpages-$(GIT_VERSION)
@@ -1613,7 +1635,7 @@ ifndef NO_TCLTK
endif
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS
-.PHONY: all install clean strip
+.PHONY: all install clean strip rpm all-rpms
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
.PHONY: .FORCE-GIT-BUILD-OPTIONS
--
1.6.2
next reply other threads:[~2009-03-27 13:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 12:32 Niels Basjes [this message]
2009-03-27 13:50 ` [PATCH] Two RPM building improvements Jakub Narebski
2009-03-27 14:45 ` Michael J Gruber
2009-03-27 16:20 ` Junio C Hamano
2009-03-27 19:43 ` Michael J Gruber
-- strict thread matches above, loose matches on Subject: below --
2009-03-27 16:07 Niels Basjes
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=1238157134-27558-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).