# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
cmake_minimum_required(VERSION 2.6)
+set(BOOST_MIN_VERSION "1.41.0")
+
project(icinga2)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
add_definitions(-DBOOST_ALL_NO_LIB)
endif()
-find_package(Boost 1.41.0 COMPONENTS thread system program_options regex REQUIRED)
+find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS thread system program_options regex REQUIRED)
+
link_directories(${Boost_LIBRARY_DIRS})
include_directories(${Boost_INCLUDE_DIRS})
* Boost library and header files (boost-devel on RHEL, libboost-all-dev
on Debian)
* GNU bison (bison)
-* GNU flex (flex)
+* GNU flex (flex) >= 2.5.35
* optional: Doxygen (doxygen)
* optional: MySQL (mysql-devel on RHEL, libmysqlclient-dev on Debian)
* optional: Python (python-devel on RHEL, python-dev on Debian)
+Note: RHEL5 ships an ancient flex version. Updated packages are available for
+example from the repoforge buildtools repository.
+
+http://mirror.hs-esslingen.de/repoforge/redhat/el5/en/{i386,x86_64}/buildtools/
+
+
User Requirements
-----------------
BuildRequires: gcc-c++
BuildRequires: libstdc++-devel
BuildRequires: cmake
-BuildRequires: flex
+BuildRequires: flex >= 2.5.35
BuildRequires: bison
BuildRequires: %{apachename}
-DICINGA2_COMMAND_GROUP=%{icingacmd_group}"
%if "%{_vendor}" == "redhat"
%if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5"
+# Boost_VERSION 1.41.0 vs 101400 - disable build tests
+# details in https://dev.icinga.org/issues/5033
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost141 \
-DBOOST_INCLUDEDIR=/usr/include/boost141 \
- -DBoost_ADDITIONAL_VERSIONS='1.41;1.41.0'"
+ -DBoost_ADDITIONAL_VERSIONS='1.41;1.41.0' \
+ -DBoost_NO_SYSTEM_PATHS=TRUE \
+ -DBUILD_TESTING=FALSE \
+ -DBoost_NO_BOOST_CMAKE=TRUE"
%endif
%endif
-cmake $CMAKE_OPTS .
+
+cmake $CMAKE_OPTS .
make %{?_smp_mflags}