]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
__noauto_regexp_helper: detect quote char at runtime
authorElan Ruusamäe <glen@delfi.ee>
Fri, 11 Jul 2014 04:38:47 +0000 (07:38 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 11 Jul 2014 04:39:48 +0000 (07:39 +0300)
this allows to use same rpm-build-macros but using old rpm 4.5 build

rpm-build-macros.spec
rpm.macros
rpm4.patch [deleted file]

index 1d88d0ef59ff9764f9a82e83c59ae21230263c91..03c11b9cc141eba013cc4d226894fdb8c4d0682c 100644 (file)
@@ -1,10 +1,3 @@
-#
-# Conditional build:
-%bcond_with    rpm4    # prepare macros for PLD rpm 4.5 instead of rpm5
-#
-%if "%{pld_release}" == "ac"
-%define        with_rpm4       1
-%endif
 %define                rpm_macros_rev  1.694
 %define                find_lang_rev   1.36
 Summary:       PLD Linux RPM build macros
@@ -19,7 +12,6 @@ Source1:      service_generator.sh
 Source3:       find-lang.sh
 Source4:       dokuwiki-find-lang.sh
 Patch0:                disable-systemd.patch
-Patch1:                rpm4.patch
 #Patchx: %{name}-pydebuginfo.patch
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: sed >= 4.0
@@ -62,7 +54,6 @@ cp -p %{SOURCE1} .
 %{__sed} -i -e '/libtoolize --copy --force --install/s/ --install//' rpm.macros
 %patch0 -p1
 %endif
-%{?with_rpm4:%patch1 -p1}
 
 %build
 %{__sed} -i -e 's,{Revision},%{rpm_macros_rev},' rpm.macros
index 3357ddff533b453c5b2be63f0e4f4a22c94c2950..725cb0a75f0721136fa561dd35c25e419e9aa09b 100644 (file)
@@ -895,7 +895,12 @@ fi; \
 # %define _noautoreq_perl Apache::.*
 # BuildRequires:       rpmbuild(macros) >= 1.672
 # %define _noautoreq_java ClassDataVersion
-%__noauto_regexp_helper(p:) %(echo "%*" | awk 'BEGIN{RS=" "}{printf("%{-p*}\\\\\\(%%s\\\\\\) ", $1)}')
+#
+%__noauto_regexp_helper(p:) %(echo "%*" | awk 'BEGIN{RS=" "}{printf("%{-p*}%{__qchar}(%%s%{__qchar}) ", $1)}')
+# detect quote character runtime
+%__qchar_4 \\\\%{nil}
+%__qchar_5 \\\\\\%{nil}
+%__qchar %{expand:%%global __qchar %%__qchar_%(echo %{_rpmversion} | cut -c1)}%__qchar
 
 #%_noautocompressdoc   %{nil}
 #
diff --git a/rpm4.patch b/rpm4.patch
deleted file mode 100644 (file)
index 01d97bd..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-build-macros-1.672/rpm.macros.orig     2013-08-18 17:59:05.046732903 +0200
-+++ rpm-build-macros-1.672/rpm.macros  2013-08-18 18:25:39.536665989 +0200
-@@ -878,7 +878,7 @@
- # %define _noautoreq_perl Apache::.*
- # BuildRequires:      rpmbuild(macros) >= 1.672
- # %define _noautoreq_java ClassDataVersion
--%__noauto_regexp_helper(p:) %(echo "%*" | awk 'BEGIN{RS=" "}{printf("%{-p*}\\\\\\(%%s\\\\\\) ", $1)}')
-+%__noauto_regexp_helper(p:) %(echo "%*" | awk 'BEGIN{RS=" "}{printf("%{-p*}\\\\(%%s\\\\) ", $1)}')
- #%_noautocompressdoc  %{nil}
- #
This page took 0.042999 seconds and 4 git commands to generate.