[Rpm-maint] [PATCH 1/3] macros.in: Move environment exhibiting to a separate macro

Alexey Gladkov gladkov.alexey at gmail.com
Mon Nov 22 13:47:28 UTC 2010


Signed-off-by: Alexey Gladkov <gladkov.alexey at gmail.com>
---
 macros.in |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/macros.in b/macros.in
index e151416..9e18472 100644
--- a/macros.in
+++ b/macros.in
@@ -676,10 +676,7 @@ print (t)\
 #	Global defaults used for building scriptlet templates.
 #
 
-%___build_shell		%{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
-%___build_args		-e
-%___build_cmd		%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
-%___build_pre	\
+%__rpm_env \
   RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
   RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
   RPM_OPT_FLAGS=\"%{optflags}\"\
@@ -700,6 +697,13 @@ print (t)\
   %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
   export CLASSPATH}\
   \
+%{nil}
+
+%___build_shell		%{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
+%___build_args		-e
+%___build_cmd		%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
+%___build_pre	\
+  %{__rpm_env}\
   %{verbose:set -x}%{!verbose:exec > /dev/null}\
   umask 022\
   cd \"%{u2p:%{_builddir}}\"\
-- 
1.7.3.2



More information about the Rpm-maint mailing list