From d285acfd048ff19d86bef769b1efe2bf54495284 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mon, 13 Jun 2016 23:38:43 +0200 Subject: [PATCH] multilib-fix: use '-' as field separator by default Also remove --additional-suffix and add --field-separator option instead. Fixes https://github.com/devexp-db/db-rpm-config/issues/2. --- multilib-fix | 28 ++++++++++++++-------------- multilib-rpm-config.spec | 5 ++++- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/multilib-fix b/multilib-fix index 964b259..48ce54b 100755 --- a/multilib-fix +++ b/multilib-fix @@ -30,7 +30,7 @@ test "$opt_arch" = ppc64p7 && opt_arch=ppc64 opt_buildroot=$(pwd) opt_verbose=: -opt_additional_suffix= +opt_field_separator=- # TODO: we could pretty easily implement other then 'cpp-header' stubs, if the # target file type allows some kind of "transparent" file inclusion. For @@ -38,6 +38,7 @@ opt_additional_suffix= # The solution is taken from Fedora PostgreSQL RPM package. print_stub () { + replacement=$filename$opt_field_separator cat <.h; this + option option allows you to override the part --verbose print some useful information --help show this help EOF @@ -122,7 +122,7 @@ while test $# -gt 0 do _opt=$1 ; shift case $_opt in - --buildroot|--arch|--additional-suffix|--file) + --buildroot|--arch|--file|--field-separator) _raw_opt=$(echo "$_opt" | sed -e 's/^--//' -e 's/-/_/g') eval "opt_$_raw_opt=\$1" shift || die "$_opt requires argument" @@ -159,7 +159,7 @@ filename=${orig_basename%%.[a-zA-Z0-9_]} suffix=${orig_basename##${filename}} # --> ../test_x86_64.h (on x86_64) -multilib_file="$destdir/$filename${opt_additional_suffix}_$opt_arch$suffix" +multilib_file="$destdir/$filename$opt_field_separator$opt_arch$suffix" test -f "$original_file" || die "can't find '$original_file'" diff --git a/multilib-rpm-config.spec b/multilib-rpm-config.spec index fbf205e..902bba0 100644 --- a/multilib-rpm-config.spec +++ b/multilib-rpm-config.spec @@ -11,7 +11,7 @@ Summary: Multilib packaging helpers Name: multilib-rpm-config Version: 1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks @@ -56,6 +56,9 @@ install -m 755 -p %{SOURCE0} %{buildroot}/%{ml_fix} %changelog +* Mon Jun 13 2016 Pavel Raiskup - 1-4 +- use '-' as field separator + * Thu Jun 09 2016 Pavel Raiskup - 1-3 - package separately from redhat-rpm-config