[PATCH] Small script to patch .spec for Suse
- From
- Josef Weidendorfer <josef.weidendorfer@gmx.de>
- Date
- Nov 15, 2005, 11:30 UTC
- Message-ID
- <200511151230.30030.Josef.Weidendorfer@gmx.de>
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