[icinga-checkins] icinga.org: icinga2/master: Fix CFLAGS/CXXFLAGS in the RPM spec file

git at icinga.org git at icinga.org
Fri Nov 14 10:30:22 CET 2014


Module: icinga2
Branch: master
Commit: db1cd8dc3888dc83eb4c3e2e7899f4eee7f7299a
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=db1cd8dc3888dc83eb4c3e2e7899f4eee7f7299a

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Fri Nov 14 07:33:24 2014 +0100

Fix CFLAGS/CXXFLAGS in the RPM spec file

fixes #7678

---

 icinga2.spec |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/icinga2.spec b/icinga2.spec
index 80d3e85..aee7b73 100644
--- a/icinga2.spec
+++ b/icinga2.spec
@@ -31,6 +31,7 @@
 %define apachegroup apache
 %if 0%{?el5}%{?el6}
 %define use_systemd 0
+%define march_flag -march=i686
 %else
 # fedora and el>=7
 %define use_systemd 1
@@ -206,15 +207,14 @@ CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost141 \
 %if "%{_vendor}" != "suse"
 CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_libdir}/nagios/plugins"
 %else
-CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_prefix}/lib/nagios/plugins \
- -DCMAKE_C_FLAGS='-march=i686' -DCMAKE_CXX_FLAGS='-march=i686'"
+CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_prefix}/lib/nagios/plugins"
 %endif
 
 %if 0%{?use_systemd}
 CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON"
 %endif
 
-cmake $CMAKE_OPTS .
+cmake $CMAKE_OPTS -DCMAKE_C_FLAGS:STRING="%{optflags} %{?march_flag}" -DCMAKE_CXX_FLAGS:STRING="%{optflags} %{?march_flag}" .
 
 make %{?_smp_mflags}
 



More information about the icinga-checkins mailing list