#/******************************************************************************
# * Icinga 2 *
-# * Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org) *
+# * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org) *
# * *
# * This program is free software; you can redistribute it and/or *
# * modify it under the terms of the GNU General Public License *
Summary: Network monitoring application
Name: icinga2
-Version: 2.2.3
+Version: 2.3.8
Release: %{revision}%{?dist}
License: GPL-2.0+
Group: Applications/System
Source: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz
-URL: http://www.icinga.org/
+URL: https://www.icinga.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: %{name}-bin = %{version}-%{release}
BuildRequires: libyajl-devel
%endif
%endif
-BuildRequires: openssl-devel
+BuildRequires: libedit-devel
+BuildRequires: ncurses-devel
+%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
+BuildRequires: gcc47-c++
+BuildRequires: libstdc++47-devel
+BuildRequires: libopenssl1-devel
+%else
BuildRequires: gcc-c++
BuildRequires: libstdc++-devel
+BuildRequires: openssl-devel
+%endif
BuildRequires: cmake
BuildRequires: flex >= 2.5.35
BuildRequires: bison
BuildRequires: make
-%if "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5")
+%if 0%{?build_icinga_org} && "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5")
# el5 requires packages.icinga.org
BuildRequires: boost153-devel
%else
-%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
+%if 0%{?build_icinga_org} && "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
# sles 11 sp3 requires packages.icinga.org
BuildRequires: boost153-devel
%else
Group: Applications/System
%if "%{_vendor}" == "suse"
BuildRequires: libmysqlclient-devel
+%if 0%{?suse_version} >= 1310
+BuildRequires: mysql-devel
%endif
+
+%else
BuildRequires: mysql-devel
+%endif #suse
+
Requires: %{name} = %{version}-%{release}
%description ido-mysql
-DICINGA2_RUNDIR=%{_rundir} \
-DICINGA2_USER=%{icinga_user} \
-DICINGA2_GROUP=%{icinga_group} \
- -DICINGA2_COMMAND_GROUP=%{icingacmd_group} \
- -DICINGA2_UNITY_BUILD=TRUE"
+ -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
%{_libexecdir}/%{name}/prepare-dirs
%{_libexecdir}/%{name}/safe-reload
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}
-%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
+%attr(0770,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/%{name}/include
%{_datadir}/%{name}/include
%files ido-mysql
%defattr(-,root,root,-)
%doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
-%{_sysconfdir}/%{name}/features-available/ido-mysql.conf
+%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/ido-mysql.conf
%{_libdir}/%{name}/libdb_ido_mysql*
%{_datadir}/icinga2-ido-mysql
%files ido-pgsql
%defattr(-,root,root,-)
%doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
-%{_sysconfdir}/%{name}/features-available/ido-pgsql.conf
+%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/ido-pgsql.conf
%{_libdir}/%{name}/libdb_ido_pgsql*
%{_datadir}/icinga2-ido-pgsql