icinga2.spec: Add selecting g++ compiler on older SUSE releases

g++ is too old, and the newer binary is suffixed.

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>

fixes #5218
This commit is contained in:
Markus Frosch 2017-04-28 15:17:21 +02:00 committed by Michael Friedrich
parent 712c526e31
commit 55181fe8b2

View File

@ -339,6 +339,12 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_prefix}/lib/nagios/plugins"
CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON"
%endif
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
# from package gcc48-c++
export CC=gcc-4.8
export CXX=g++-4.8
%endif
%{?scl_enable} cmake $CMAKE_OPTS -DCMAKE_C_FLAGS:STRING="%{optflags} %{?march_flag}" -DCMAKE_CXX_FLAGS:STRING="%{optflags} %{?march_flag}" .
make %{?_smp_mflags}