From eee654b9652fb9387018f9653431a11401a354fd Mon Sep 17 00:00:00 2001
From: openeuler-basic <shenyangyang4@huawei.com>
Date: Thu, 9 Jan 2020 19:16:58 +0800
Subject: [PATCH] Unbundle config site and add RPM LD FLAGS macro

---
 macros.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/macros.in b/macros.in
index fe9803a..4027493 100644
--- a/macros.in
+++ b/macros.in
@@ -794,10 +794,11 @@ package or when debugging this package.\
   RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
   RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
   RPM_OPT_FLAGS=\"%{optflags}\"\
+  RPM_LD_FLAGS=\"%{?build_ldflags}\"\
   RPM_ARCH=\"%{_arch}\"\
   RPM_OS=\"%{_os}\"\
   RPM_BUILD_NCPUS=\"%{_smp_build_ncpus}\"\
-  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS\
+  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_OPT_FLAGS\
   RPM_DOC_DIR=\"%{_docdir}\"\
   export RPM_DOC_DIR\
   RPM_PACKAGE_NAME=\"%{NAME}\"\
@@ -813,6 +814,8 @@ package or when debugging this package.\
   export CLASSPATH}\
   PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\
   export PKG_CONFIG_PATH\
+  CONFIG_SITE=${CONFIG_SITE:-NONE}\
+  export CONFIG_SITE\
   \
   %{verbose:set -x}\
   umask 022\
-- 
1.8.3.1

