-#
-# 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
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
%{__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
# %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}
#
+++ /dev/null
---- 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}
- #