Commit 519433f9 authored by Markus Frosch's avatar Markus Frosch
Browse files

Update Boost handling in spec and require 1.66

parent 0235fa7c
Pipeline #3534 passed with stages
in 16 minutes and 33 seconds
......@@ -80,6 +80,8 @@
%define logmsg logger -t %{name}/rpm
%define boost_min_version 1.66
Summary: Network monitoring application
%if "%{_vendor}" == "suse"
License: GPL-2.0-or-later
......@@ -139,29 +141,26 @@ BuildRequires: cmake
BuildRequires: flex >= 2.5.35
BuildRequires: make
%if 0%{?build_icinga_org} && "%{_vendor}" == "redhat" && (0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
# el6 require packages.icinga.com
BuildRequires: boost153-devel
%else
%if 0%{?build_icinga_org} && "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
# sles 11 sp3 requires packages.icinga.com
BuildRequires: boost153-devel
%else
%if "%{_vendor}" == "suse" && 0%{?suse_version} > 1320
BuildRequires: libboost_program_options-devel >= 1.48
BuildRequires: libboost_regex-devel >= 1.48
BuildRequires: libboost_system-devel >= 1.48
BuildRequires: libboost_thread-devel >= 1.48
%else
%if (0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
# Requires EPEL repository
BuildRequires: boost148-devel >= 1.48
%else
BuildRequires: boost-devel >= 1.48
%endif
%endif
%endif
%endif
%if "%{_vendor}" == "suse"
%if 0%{?suse_version} > 1320 # SLES 15 and OpenSUSE
BuildRequires: libboost_program_options-devel >= %{boost_min_version}
BuildRequires: libboost_regex-devel >= %{boost_min_version}
BuildRequires: libboost_system-devel >= %{boost_min_version}
BuildRequires: libboost_thread-devel >= %{boost_min_version}
%else #suse_version > 1320
BuildRequires: boost-devel >= %{boost_min_version}
%endif #suse_version > 1320
%else # vendor == suse - assuming redhat or compatible
%if (0%{?el6} || 0%{?rhel} == 6) || (0%{?el7} || 0%{?rhel} == 7)
%define boost_library boost169
%define boost_version 1.69
# el6: Provided by packages.icinga.com
# el7: Provided from EPEL
BuildRequires: boost169-devel >= %{boost_min_version}
%else # el6 or el7
BuildRequires: boost-devel >= %{boost_min_version}
%endif # el6 or el7
%endif # vendor == suse
%if 0%{?use_systemd}
BuildRequires: systemd-devel
......@@ -323,34 +322,19 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
%if 0%{?fedora}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_STUDIO=true"
%endif
%if "%{_vendor}" == "redhat"
%if 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
%if 0%{?build_icinga_org}
# Boost_VERSION 1.41.0 vs 101400 - disable build tests
# details in https://dev.icinga.com/issues/5033
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=%{_libdir}/boost153 \
-DBOOST_INCLUDEDIR=/usr/include/boost153 \
-DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0'"
%else
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=%{_libdir}/boost148 \
-DBOOST_INCLUDEDIR=/usr/include/boost148 \
-DBoost_ADDITIONAL_VERSIONS='1.48;1.48.0'"
%endif
CMAKE_OPTS="$CMAKE_OPTS \
-DBoost_NO_SYSTEM_PATHS=TRUE \
-DBUILD_TESTING=FALSE \
-DBoost_NO_BOOST_CMAKE=TRUE"
%endif
%endif
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=%{_libdir}/boost153 \
-DBOOST_INCLUDEDIR=/usr/include/boost153 \
-DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
%if "%{?boost_library}" != ""
# Boost_NO_BOOST_CMAKE=ON - disable search for cmake
# Boost_NO_SYSTEM_PATHS=ON - only search in specified locations
CMAKE_OPTS="$CMAKE_OPTS
-DBoost_NO_BOOST_CMAKE=TRUE \
-DBoost_NO_SYSTEM_PATHS=TRUE \
-DBUILD_TESTING=FALSE \
-DBoost_NO_BOOST_CMAKE=TRUE"
%endif
-DBOOST_LIBRARYDIR=%{_libdir}/%{boost_library} \
-DBOOST_INCLUDEDIR=/usr/include/%{boost_library} \
-DBoost_ADDITIONAL_VERSIONS='%{boost_version};%{boost_version}.0'"
# TODO: does testing work now?
# -DBUILD_TESTING=FALSE"
%endif # boost_library
%if 0%{?use_systemd}
CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment