git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Small script to patch .spec for Suse
@ 2005-11-15 11:30 Josef Weidendorfer
  2005-11-15 18:50 ` Junio C Hamano
  0 siblings, 1 reply; 11+ messages in thread
From: Josef Weidendorfer @ 2005-11-15 11:30 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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.

Usage: Run contrib/patch-spec-for-suse before "make rpm"

Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
---
This is handy for Suse users which want to install Git by creating
there own RPM from source. It works for me (on Suse 10.0).
I hope it works for other versions, too.
Perhaps somebody has a better idea how to come up with
corrected .spec files for different distros.

 contrib/patch-spec-for-suse |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100755 contrib/patch-spec-for-suse

applies-to: 4b6dbe856a3e63699b299c76f4f1fc5cb34cbe26
3e0d98b8065c7a23c6b9a16811bb7b066b13bffc
diff --git a/contrib/patch-spec-for-suse b/contrib/patch-spec-for-suse
new file mode 100755
index 0000000..5b9795c
--- /dev/null
+++ b/contrib/patch-spec-for-suse
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# The git-core.spec for RPM creation in the git source works
+# fine for fedora core, but not other distributions.
+# This script patches some distribution dependent package names
+# to make it work for Suse (at least 10.0)
+#
+# Run it from gits main directory like
+#  contrib/patch-for-suse
+# Note! This changes git-core.spec.in. So if you do git development
+# yourself, do *not* commit the changed file, or revert before with
+#  mv git-core.spec.in.orig git-core.spec.in
+#
+
+[ ! -f git-core.spec.in ] && echo "git-core.spec.in not found!" && exit 1
+cp git-core.spec.in git-core.spec.in.orig
+
+# Updates for Suse:
+#  - no seperate "openssh-clients"
+#  - "expat" contains devel files
+
+cat git-core.spec.in \
+ | sed -e 's/openssh-clients/openssh/' \
+ | sed -e 's/expat-devel/expat/' \
+ > git-core.spec.temp
+
+mv git-core.spec.temp git-core.spec.in
+echo "git-core.spec.in sucessfully patched."
+
---
0.99.9.GIT

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-11-18  6:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-15 11:30 [PATCH] Small script to patch .spec for Suse Josef Weidendorfer
2005-11-15 18:50 ` Junio C Hamano
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

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).