Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
packaging
Icinga 2 Security Releases 2.12.5 and 2.11.10
rpm-icinga2
Commits
162a2ca8
Unverified
Commit
162a2ca8
authored
Apr 30, 2019
by
FrostbyteGR
Committed by
GitHub
Apr 30, 2019
Browse files
Add conditional build macros
Works the same way by default, but now there are options.
parent
7fe01f57
Changes
1
Hide whitespace changes
Inline
Side-by-side
icinga2.spec
View file @
162a2ca8
...
@@ -61,6 +61,26 @@
...
@@ -61,6 +61,26 @@
%define icinga_group icinga
%define icinga_group icinga
%define icingacmd_group icingacmd
%define icingacmd_group icingacmd
# enable unity builds by default for all architectures except arm32
%ifarch %{arm}
%bcond_with unity_build
%else
%bcond_without unity_build
%endif
%bcond_without lto_build
%bcond_with systemd_and_init
%bcond_without checker
%bcond_without compat
%bcond_with demo
%bcond_with hello
%bcond_without livestatus
%bcond_without notification
%bcond_without perfdata
%bcond_without tests
%bcond_without mysql
%bcond_without pgsql
%define logmsg logger -t %{name}/rpm
%define logmsg logger -t %{name}/rpm
%define boost_min_version 1.66
%define boost_min_version 1.66
...
@@ -326,7 +346,6 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
...
@@ -326,7 +346,6 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DICINGA2_LTO_BUILD=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBoost_NO_BOOST_CMAKE=ON \
-DBoost_NO_BOOST_CMAKE=ON \
-DICINGA2_PLUGINDIR=%{plugindir} \
-DICINGA2_PLUGINDIR=%{plugindir} \
...
@@ -339,6 +358,72 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
...
@@ -339,6 +358,72 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_STUDIO=true"
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_STUDIO=true"
%endif
%endif
%if %{with unity_build}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_UNITY_BUILD=OFF"
%endif
%if %{with lto_build}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_LTO_BUILD=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_LTO_BUILD=OFF"
%endif
%if %{with systemd_and_init}
CMAKE_OPTS="$CMAKE_OPTS -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=OFF"
%endif
%if %{with checker}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_CHECKER=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_CHECKER=OFF"
%endif
%if %{with compat}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_COMPAT=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_COMPAT=OFF"
%endif
%if %{with demo}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_DEMO=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_DEMO=OFF"
%endif
%if %{with hello}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_HELLO=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_HELLO=OFF"
%endif
%if %{with livestatus}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_LIVESTATUS=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_LIVESTATUS=OFF"
%endif
%if %{with notification}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_NOTIFICATION=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_NOTIFICATION=OFF"
%endif
%if %{with perfdata}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_PERFDATA=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_PERFDATA=OFF"
%endif
%if %{with tests}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_TESTS=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_TESTS=OFF"
%endif
%if %{with mysql}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_MYSQL=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_MYSQL=OFF"
%endif
%if %{with pgsql}
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_PGSQL=ON"
%else
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_PGSQL=OFF"
%endif
%if (0%{?el6} || 0%{?rhel} == 6)
%if (0%{?el6} || 0%{?rhel} == 6)
# Explicitly link against rt, because ld doesn't detect it automatically
# Explicitly link against rt, because ld doesn't detect it automatically
CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_EXE_LINKER_FLAGS=-lrt"
CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_EXE_LINKER_FLAGS=-lrt"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment