From: Junio C Hamano <junkio@cox.net>
To: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Small script to patch .spec for Suse
Date: Tue, 15 Nov 2005 10:50:35 -0800 [thread overview]
Message-ID: <7vfypxlp8k.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <200511151230.30030.Josef.Weidendorfer@gmx.de> (Josef Weidendorfer's message of "Tue, 15 Nov 2005 12:30:29 +0100")
Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:
> Everytime I update and want to generate RPM packages for
> my Suse distribution, I have to patch the git-core.spec.in
> Here is the current script for patching. It is only about
> package names, so a seperate .spec file would
> be overkill and a maintenance problem for me.
I've applied the patch from HPA to update it to git.spec already
in my tree, so your script would not work any more ;-)
But seriously, I suspect we should take a hint from the fact
that "git.spec.in" has ".in" in its name already.
Right now, git.spec is generated with this:
git.spec: git.spec.in Makefile
sed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@
So presumably you could do something like this:
--- git.spec.in
+++ git.spec.in
@@ -9,3 +9,3 @@
Source: http://kernel.org/pub/software/scm/git/%{name}-%{...
-BuildRequires: zlib-devel >= 1.2, openssl-devel, curl-devel, exp...
+BuildRequires: @@BUILD_REQUIRES@@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(...
@@ -26,3 +26,3 @@
Group: Development/Tools
-Requires: zlib >= 1.2, rsync, rcs, curl, less, openssh-clie...
+Requires: @@CORE_REQUIRES@@
%description core
@@ -40,3 +40,3 @@
Group: Development/Tools
-Requires: git-core = %{version}-%{release}, subversion
+Requires: git-core = %{version}-%{release}, @@SVN_REQUIRES@@
%description svn
@@ -47,3 +47,3 @@
Group: Development/Tools
-Requires: git-core = %{version}-%{release}, cvs, cvsps
+Requires: git-core = %{version}-%{release}, @@CVS_REQUIRES@@
...
and have something like this in the Makefile when you munge
git.spec.in to produce git.spec for use with rpmbuild?
RPM_BUILD_REQUIRES = zlib-devel >= 1.2 openssl-devel ...
RPM_CORE_REQUIRES = zlib >= 1.2 rsync rcs curl less ...
ifdef SUSE
include suse.rpm.defs
endif
git.spec: git.spec.in Makefile
sed \
-e 's/@@VERSION@@/$(GIT_VERSION)/g' \
-e 's/@@BUILD_REQUIRES@@/$(RPM_BUILD_REQUIRES)/g' \
-e 's/@@CORE_REQUIRES@@/$(RPM_CORE_REQUIRES)/g' \
-e 's/@@SVN_REQUIRES@@/$(RPM_SVN_REQUIRES)/g' \
-e 's/@@CVS_REQUIRES@@/$(RPM_CVS_REQUIRES)/g' \
-e 's/@@TLA_REQUIRES@@/$(RPM_TLA_REQUIRES)/g' \
-e 's/@@EMAIL_REQUIRES@@/$(RPM_EMAIL_REQUIRES)/g' \
-e 's/@@GITK_REQUIRES@@/$(RPM_GITK_REQUIRES)/g' \
<$< >$@
next prev parent reply other threads:[~2005-11-15 18:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-15 11:30 [PATCH] Small script to patch .spec for Suse Josef Weidendorfer
2005-11-15 18:50 ` Junio C Hamano [this message]
2005-11-15 20:36 ` H. Peter Anvin
2005-11-15 21:47 ` Junio C Hamano
2005-11-15 21:56 ` Andreas Ericsson
2005-11-15 21:59 ` Petr Baudis
2005-11-15 22:22 ` H. Peter Anvin
2005-11-16 1:32 ` Josef Weidendorfer
2005-11-18 5:11 ` H. Peter Anvin
2005-11-18 5:47 ` A Large Angry SCM
2005-11-18 5:57 ` H. Peter Anvin
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=7vfypxlp8k.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Josef.Weidendorfer@gmx.de \
--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).