2013-10-22 13:14:25 +02:00
|
|
|
#/******************************************************************************
|
|
|
|
# * Icinga 2 *
|
2017-01-10 15:54:22 +01:00
|
|
|
# * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/) *
|
2013-10-22 13:14:25 +02:00
|
|
|
# * *
|
|
|
|
# * This program is free software; you can redistribute it and/or *
|
|
|
|
# * modify it under the terms of the GNU General Public License *
|
|
|
|
# * as published by the Free Software Foundation; either version 2 *
|
|
|
|
# * of the License, or (at your option) any later version. *
|
|
|
|
# * *
|
|
|
|
# * This program is distributed in the hope that it will be useful, *
|
|
|
|
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
# * GNU General Public License for more details. *
|
|
|
|
# * *
|
|
|
|
# * You should have received a copy of the GNU General Public License *
|
|
|
|
# * along with this program; if not, write to the Free Software Foundation *
|
|
|
|
# * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
|
|
|
# ******************************************************************************/
|
|
|
|
|
2016-08-23 02:38:09 +02:00
|
|
|
%define revision 1
|
2013-10-08 14:45:35 +02:00
|
|
|
|
2014-08-14 16:23:03 +02:00
|
|
|
# make sure that _rundir is working on older systems
|
|
|
|
%if ! %{defined _rundir}
|
|
|
|
%define _rundir %{_localstatedir}/run
|
|
|
|
%endif
|
|
|
|
|
2014-12-01 19:51:11 +01:00
|
|
|
%define _libexecdir %{_prefix}/lib/
|
|
|
|
|
2013-10-08 14:45:35 +02:00
|
|
|
%if "%{_vendor}" == "redhat"
|
2013-10-14 10:25:18 +02:00
|
|
|
%define apachename httpd
|
2013-10-10 16:43:15 +02:00
|
|
|
%define apacheconfdir %{_sysconfdir}/httpd/conf.d
|
2013-10-13 19:15:52 +02:00
|
|
|
%define apacheuser apache
|
|
|
|
%define apachegroup apache
|
2014-06-15 17:17:21 +02:00
|
|
|
%if 0%{?el5}%{?el6}
|
|
|
|
%define use_systemd 0
|
2014-11-17 10:22:52 +01:00
|
|
|
%if %(uname -m) != "x86_64"
|
2014-11-14 07:33:24 +01:00
|
|
|
%define march_flag -march=i686
|
2014-11-17 10:22:52 +01:00
|
|
|
%endif
|
2014-06-15 17:17:21 +02:00
|
|
|
%else
|
|
|
|
# fedora and el>=7
|
|
|
|
%define use_systemd 1
|
|
|
|
%endif
|
2013-10-08 14:45:35 +02:00
|
|
|
%endif
|
2014-06-15 17:17:21 +02:00
|
|
|
|
2013-10-08 14:45:35 +02:00
|
|
|
%if "%{_vendor}" == "suse"
|
2014-07-30 13:41:23 +02:00
|
|
|
%define apachename apache2
|
|
|
|
%define apacheconfdir %{_sysconfdir}/apache2/conf.d
|
|
|
|
%define apacheuser wwwrun
|
|
|
|
%define apachegroup www
|
2014-01-14 18:30:57 +01:00
|
|
|
%if 0%{?suse_version} >= 1310
|
2014-07-04 11:49:51 +02:00
|
|
|
%define use_systemd 1
|
2014-01-14 18:30:57 +01:00
|
|
|
%else
|
2014-07-04 11:49:51 +02:00
|
|
|
%define use_systemd 0
|
2014-01-14 18:30:57 +01:00
|
|
|
%endif
|
2013-10-08 14:45:35 +02:00
|
|
|
%endif
|
2013-10-01 19:29:09 +02:00
|
|
|
|
2013-10-08 16:10:14 +02:00
|
|
|
%define icinga_user icinga
|
|
|
|
%define icinga_group icinga
|
|
|
|
%define icingacmd_group icingacmd
|
2014-03-10 14:11:27 +01:00
|
|
|
%define icingaweb2name icingaweb2
|
|
|
|
%define icingaweb2version 2.0.0
|
2013-10-08 16:10:14 +02:00
|
|
|
|
2013-10-10 16:43:15 +02:00
|
|
|
%define icingaclassicconfdir %{_sysconfdir}/icinga
|
|
|
|
|
2013-10-01 19:29:09 +02:00
|
|
|
%define logmsg logger -t %{name}/rpm
|
|
|
|
|
2013-11-25 17:35:44 +01:00
|
|
|
Summary: Network monitoring application
|
2013-11-03 13:45:26 +01:00
|
|
|
Name: icinga2
|
2017-03-29 09:51:33 +02:00
|
|
|
Version: 2.6.3
|
2013-10-01 19:29:09 +02:00
|
|
|
Release: %{revision}%{?dist}
|
2014-07-05 11:44:03 +02:00
|
|
|
License: GPL-2.0+
|
2012-05-26 23:12:46 +02:00
|
|
|
Group: Applications/System
|
2014-07-11 09:11:34 +02:00
|
|
|
Source: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz
|
2017-01-10 15:54:22 +01:00
|
|
|
URL: https://www.icinga.com/
|
2012-05-26 14:42:03 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-08-27 13:49:48 +02:00
|
|
|
Requires: %{name}-bin = %{version}-%{release}
|
2014-03-10 14:11:27 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Meta package for Icinga 2 Core, DB IDO and Web.
|
|
|
|
|
|
|
|
%package bin
|
|
|
|
Summary: Icinga 2 binaries and libraries
|
|
|
|
Group: Applications/System
|
|
|
|
|
2014-07-04 13:29:40 +02:00
|
|
|
%if "%{_vendor}" == "suse"
|
2014-08-14 17:34:26 +02:00
|
|
|
PreReq: permissions
|
2014-08-14 17:35:42 +02:00
|
|
|
Provides: monitoring_daemon
|
2014-08-14 17:34:26 +02:00
|
|
|
Recommends: monitoring-plugins
|
2014-11-26 16:35:29 +01:00
|
|
|
%if 0%{?suse_version} >= 1310
|
|
|
|
BuildRequires: libyajl-devel
|
|
|
|
%endif
|
2014-07-04 13:29:40 +02:00
|
|
|
%endif
|
2015-03-17 10:42:46 +01:00
|
|
|
BuildRequires: libedit-devel
|
|
|
|
BuildRequires: ncurses-devel
|
2015-07-06 11:41:50 +02:00
|
|
|
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
|
2016-03-08 15:00:26 +01:00
|
|
|
BuildRequires: gcc48-c++
|
2016-12-14 15:23:58 +01:00
|
|
|
BuildRequires: libstdc++48-devel
|
2015-07-06 11:41:50 +02:00
|
|
|
BuildRequires: libopenssl1-devel
|
2015-07-05 15:10:43 +02:00
|
|
|
%else
|
2012-05-26 14:42:03 +02:00
|
|
|
BuildRequires: gcc-c++
|
2013-08-16 16:17:14 +02:00
|
|
|
BuildRequires: libstdc++-devel
|
2015-07-06 11:41:50 +02:00
|
|
|
BuildRequires: openssl-devel
|
2015-07-05 15:10:43 +02:00
|
|
|
%endif
|
2013-11-03 13:45:26 +01:00
|
|
|
BuildRequires: cmake
|
2013-12-18 12:54:49 +01:00
|
|
|
BuildRequires: flex >= 2.5.35
|
2013-08-28 18:14:13 +02:00
|
|
|
BuildRequires: bison
|
2014-05-21 09:39:23 +02:00
|
|
|
BuildRequires: make
|
2016-01-11 16:17:01 +01:00
|
|
|
%if 0%{?fedora}
|
|
|
|
BuildRequires: wxGTK3-devel
|
|
|
|
%endif
|
2014-12-16 12:22:02 +01:00
|
|
|
|
2015-04-21 15:20:36 +02:00
|
|
|
%if 0%{?build_icinga_org} && "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
2017-01-10 15:54:22 +01:00
|
|
|
# el5 and el6 require packages.icinga.com
|
2014-12-05 14:05:08 +01:00
|
|
|
BuildRequires: boost153-devel
|
2013-10-07 17:34:05 +02:00
|
|
|
%else
|
2015-02-05 10:16:05 +01:00
|
|
|
%if 0%{?build_icinga_org} && "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
|
2017-01-10 15:54:22 +01:00
|
|
|
# sles 11 sp3 requires packages.icinga.com
|
2014-12-17 16:36:50 +01:00
|
|
|
BuildRequires: boost153-devel
|
|
|
|
%else
|
2013-10-01 19:29:09 +02:00
|
|
|
BuildRequires: boost-devel >= 1.41
|
2013-10-07 18:03:48 +02:00
|
|
|
%endif
|
2014-12-17 16:36:50 +01:00
|
|
|
%endif
|
2013-10-01 19:29:09 +02:00
|
|
|
|
2014-06-15 17:17:21 +02:00
|
|
|
%if 0%{?use_systemd}
|
|
|
|
BuildRequires: systemd
|
|
|
|
Requires: systemd
|
|
|
|
%endif
|
|
|
|
|
2016-01-11 16:17:01 +01:00
|
|
|
Requires: %{name}-libs = %{version}-%{release}
|
2013-10-08 16:10:14 +02:00
|
|
|
|
2014-03-10 14:11:27 +01:00
|
|
|
%description bin
|
|
|
|
Icinga 2 is a general-purpose network monitoring application.
|
2016-01-11 16:17:01 +01:00
|
|
|
Provides binaries for Icinga 2 Core.
|
2012-05-26 14:42:03 +02:00
|
|
|
|
2013-10-08 14:45:35 +02:00
|
|
|
%package common
|
|
|
|
Summary: Common Icinga 2 configuration
|
|
|
|
Group: Applications/System
|
2013-10-08 16:10:14 +02:00
|
|
|
%if "%{_vendor}" == "redhat"
|
2013-10-08 14:45:35 +02:00
|
|
|
Requires(pre): shadow-utils
|
|
|
|
Requires(post): shadow-utils
|
2013-10-08 16:10:14 +02:00
|
|
|
%endif
|
2014-07-04 11:18:31 +02:00
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
Recommends: logrotate
|
|
|
|
%endif
|
2013-10-08 14:45:35 +02:00
|
|
|
|
|
|
|
%description common
|
|
|
|
Provides common directories, uid and gid among Icinga 2 related
|
|
|
|
packages.
|
|
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for Icinga 2
|
|
|
|
Group: Applications/System
|
2013-10-14 10:31:03 +02:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2013-10-08 14:45:35 +02:00
|
|
|
|
|
|
|
%description doc
|
2014-07-04 11:19:45 +02:00
|
|
|
Provides documentation for Icinga 2.
|
2013-10-08 14:45:35 +02:00
|
|
|
|
|
|
|
|
2016-01-11 16:17:01 +01:00
|
|
|
%package libs
|
|
|
|
Summary: Libraries for Icinga 2
|
|
|
|
Group: Applications/System
|
|
|
|
Requires: %{name}-common = %{version}-%{release}
|
|
|
|
|
|
|
|
%description libs
|
|
|
|
Provides internal libraries for the daemon or studio.
|
|
|
|
|
|
|
|
|
2013-10-01 19:29:09 +02:00
|
|
|
%package ido-mysql
|
2013-10-03 12:28:13 +02:00
|
|
|
Summary: IDO MySQL database backend for Icinga 2
|
2013-10-01 19:29:09 +02:00
|
|
|
Group: Applications/System
|
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
BuildRequires: libmysqlclient-devel
|
2015-07-05 14:32:20 +02:00
|
|
|
%if 0%{?suse_version} >= 1310
|
|
|
|
BuildRequires: mysql-devel
|
2013-10-01 19:29:09 +02:00
|
|
|
%endif
|
2015-07-05 14:32:20 +02:00
|
|
|
|
|
|
|
%else
|
2013-10-01 19:29:09 +02:00
|
|
|
BuildRequires: mysql-devel
|
2015-07-05 14:32:20 +02:00
|
|
|
%endif #suse
|
|
|
|
|
2013-10-14 10:31:03 +02:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2013-10-01 19:29:09 +02:00
|
|
|
|
2013-10-07 17:53:53 +02:00
|
|
|
%description ido-mysql
|
2013-10-01 19:29:09 +02:00
|
|
|
Icinga 2 IDO mysql database backend. Compatible with Icinga 1.x
|
2014-12-09 17:17:53 +01:00
|
|
|
IDOUtils schema >= 1.12
|
2013-10-01 19:29:09 +02:00
|
|
|
|
2013-11-05 09:54:51 +01:00
|
|
|
|
|
|
|
%package ido-pgsql
|
|
|
|
Summary: IDO PostgreSQL database backend for Icinga 2
|
|
|
|
Group: Applications/System
|
2016-12-14 15:23:58 +01:00
|
|
|
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
|
|
|
|
BuildRequires: postgresql-devel >= 8.4
|
|
|
|
%else
|
2013-11-05 09:54:51 +01:00
|
|
|
BuildRequires: postgresql-devel
|
2016-12-14 15:23:58 +01:00
|
|
|
%endif
|
2013-11-05 09:54:51 +01:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description ido-pgsql
|
|
|
|
Icinga 2 IDO PostgreSQL database backend. Compatible with Icinga 1.x
|
2014-12-09 17:17:53 +01:00
|
|
|
IDOUtils schema >= 1.12
|
2013-11-05 09:54:51 +01:00
|
|
|
|
|
|
|
|
2013-10-10 16:43:15 +02:00
|
|
|
%package classicui-config
|
|
|
|
Summary: Icinga 2 Classic UI Standalone configuration
|
|
|
|
Group: Applications/System
|
2014-03-10 14:11:27 +01:00
|
|
|
BuildRequires: %{apachename}
|
2013-10-14 10:25:18 +02:00
|
|
|
Requires: %{apachename}
|
2013-10-17 14:05:12 +02:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2014-08-14 17:34:26 +02:00
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
Recommends: icinga-www
|
|
|
|
%endif
|
2013-10-10 16:43:15 +02:00
|
|
|
Provides: icinga-classicui-config
|
|
|
|
Conflicts: icinga-gui-config
|
|
|
|
|
|
|
|
%description classicui-config
|
|
|
|
Icinga 1.x Classic UI Standalone configuration with locations
|
|
|
|
for Icinga 2.
|
|
|
|
|
2015-06-02 13:32:48 +02:00
|
|
|
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
2015-05-07 22:26:42 +02:00
|
|
|
%global selinux_variants mls targeted
|
|
|
|
%{!?_selinux_policy_version: %global _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null)}
|
|
|
|
%global modulename %{name}
|
|
|
|
|
|
|
|
%package selinux
|
|
|
|
Summary: SELinux policy module supporting icinga2
|
|
|
|
Group: System Environment/Base
|
|
|
|
BuildRequires: checkpolicy, selinux-policy-devel, /usr/share/selinux/devel/policyhelp, hardlink
|
|
|
|
%if "%{_selinux_policy_version}" != ""
|
|
|
|
Requires: selinux-policy >= %{_selinux_policy_version}
|
|
|
|
%endif
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
2017-04-07 14:06:24 +02:00
|
|
|
Requires(post): policycoreutils-python
|
|
|
|
Requires(postun): policycoreutils-python
|
2015-05-07 22:26:42 +02:00
|
|
|
|
|
|
|
%description selinux
|
|
|
|
SELinux policy module supporting icinga2
|
|
|
|
%endif
|
|
|
|
|
2013-10-01 19:29:09 +02:00
|
|
|
|
2016-01-11 16:17:01 +01:00
|
|
|
%if 0%{?fedora}
|
|
|
|
%package studio
|
|
|
|
Summary: Studio for Icinga 2
|
|
|
|
Group: Applications/System
|
|
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
|
|
Requires: wxGTK3
|
|
|
|
|
|
|
|
%description studio
|
|
|
|
Provides a GUI for the Icinga 2 API.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2015-04-28 19:14:05 +02:00
|
|
|
%package -n vim-icinga2
|
|
|
|
Summary: Vim syntax highlighting for icinga2
|
|
|
|
Group: Applications/System
|
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
Requires: vim-data
|
|
|
|
%else
|
|
|
|
Requires: vim-filesystem
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description -n vim-icinga2
|
|
|
|
Vim syntax highlighting for icinga2
|
|
|
|
|
|
|
|
|
|
|
|
%package -n nano-icinga2
|
|
|
|
Summary: Nano syntax highlighting for icinga2
|
|
|
|
Group: Applications/System
|
|
|
|
Requires: nano
|
|
|
|
|
|
|
|
%description -n nano-icinga2
|
|
|
|
Nano syntax highlighting for icinga2
|
|
|
|
|
2012-05-26 14:42:03 +02:00
|
|
|
%prep
|
2012-05-27 16:21:50 +02:00
|
|
|
%setup -q -n %{name}-%{version}
|
2012-05-26 14:42:03 +02:00
|
|
|
|
|
|
|
%build
|
2013-11-03 13:45:26 +01:00
|
|
|
CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
2014-07-16 09:03:51 +02:00
|
|
|
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
|
2013-11-03 13:45:26 +01:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2016-08-27 21:44:31 +02:00
|
|
|
-DICINGA2_LTO_BUILD=ON \
|
2014-11-14 06:37:30 +01:00
|
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
2014-10-29 13:03:28 +01:00
|
|
|
-DBoost_NO_BOOST_CMAKE=ON \
|
2014-08-14 16:23:03 +02:00
|
|
|
-DICINGA2_RUNDIR=%{_rundir} \
|
2013-11-03 13:45:26 +01:00
|
|
|
-DICINGA2_USER=%{icinga_user} \
|
|
|
|
-DICINGA2_GROUP=%{icinga_group} \
|
2015-03-01 01:27:42 +01:00
|
|
|
-DICINGA2_COMMAND_GROUP=%{icingacmd_group}"
|
2016-01-11 16:17:01 +01:00
|
|
|
%if 0%{?fedora}
|
|
|
|
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_STUDIO=true"
|
|
|
|
%endif
|
2013-11-03 13:45:26 +01:00
|
|
|
%if "%{_vendor}" == "redhat"
|
2015-04-21 15:20:36 +02:00
|
|
|
%if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
|
2013-12-18 12:54:49 +01:00
|
|
|
# Boost_VERSION 1.41.0 vs 101400 - disable build tests
|
2017-01-10 15:54:22 +01:00
|
|
|
# details in https://dev.icinga.com/issues/5033
|
2014-12-17 16:36:50 +01:00
|
|
|
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost153 \
|
|
|
|
-DBOOST_INCLUDEDIR=/usr/include/boost153 \
|
2014-12-05 14:05:08 +01:00
|
|
|
-DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
|
2013-12-18 12:54:49 +01:00
|
|
|
-DBoost_NO_SYSTEM_PATHS=TRUE \
|
|
|
|
-DBUILD_TESTING=FALSE \
|
|
|
|
-DBoost_NO_BOOST_CMAKE=TRUE"
|
2014-05-27 09:26:38 +02:00
|
|
|
%endif
|
2015-04-21 15:10:55 +02:00
|
|
|
%if 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
|
|
|
|
CMAKE_OPTS="$CMAKE_OPTS -DBUILD_TESTING=FALSE"
|
|
|
|
%endif
|
2013-11-03 13:45:26 +01:00
|
|
|
%endif
|
2014-06-15 17:17:21 +02:00
|
|
|
|
2014-07-16 09:03:51 +02:00
|
|
|
%if "%{_vendor}" != "suse"
|
2014-07-22 13:22:39 +02:00
|
|
|
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_libdir}/nagios/plugins"
|
2014-07-16 09:03:51 +02:00
|
|
|
%else
|
2014-12-17 16:36:50 +01:00
|
|
|
%if 0%{?suse_version} < 1310
|
|
|
|
CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost153 \
|
|
|
|
-DBOOST_INCLUDEDIR=/usr/include/boost153 \
|
|
|
|
-DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
|
|
|
|
-DBoost_NO_SYSTEM_PATHS=TRUE \
|
|
|
|
-DBUILD_TESTING=FALSE \
|
|
|
|
-DBoost_NO_BOOST_CMAKE=TRUE"
|
|
|
|
%endif
|
2014-11-14 07:33:24 +01:00
|
|
|
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_prefix}/lib/nagios/plugins"
|
2014-07-16 09:03:51 +02:00
|
|
|
%endif
|
|
|
|
|
2014-06-15 17:17:21 +02:00
|
|
|
%if 0%{?use_systemd}
|
|
|
|
CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON"
|
2013-11-03 13:45:26 +01:00
|
|
|
%endif
|
2013-12-18 12:54:49 +01:00
|
|
|
|
2014-11-14 07:33:24 +01:00
|
|
|
cmake $CMAKE_OPTS -DCMAKE_C_FLAGS:STRING="%{optflags} %{?march_flag}" -DCMAKE_CXX_FLAGS:STRING="%{optflags} %{?march_flag}" .
|
2013-10-01 19:29:09 +02:00
|
|
|
|
2012-05-27 16:21:50 +02:00
|
|
|
make %{?_smp_mflags}
|
2012-05-26 14:42:03 +02:00
|
|
|
|
2015-06-02 13:32:48 +02:00
|
|
|
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
2015-05-07 22:26:42 +02:00
|
|
|
cd tools/selinux
|
|
|
|
for selinuxvariant in %{selinux_variants}
|
|
|
|
do
|
|
|
|
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
|
|
|
|
mv %{modulename}.pp %{modulename}.pp.${selinuxvariant}
|
|
|
|
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
|
|
|
|
done
|
|
|
|
cd -
|
|
|
|
%endif
|
2014-07-04 11:23:39 +02:00
|
|
|
|
2012-05-26 14:42:03 +02:00
|
|
|
%install
|
2013-10-01 19:29:09 +02:00
|
|
|
make install \
|
2013-11-03 13:45:26 +01:00
|
|
|
DESTDIR="%{buildroot}"
|
2013-10-01 19:29:09 +02:00
|
|
|
|
2013-10-10 16:43:15 +02:00
|
|
|
# install classicui config
|
|
|
|
install -D -m 0644 etc/icinga/icinga-classic.htpasswd %{buildroot}%{icingaclassicconfdir}/passwd
|
|
|
|
install -D -m 0644 etc/icinga/cgi.cfg %{buildroot}%{icingaclassicconfdir}/cgi.cfg
|
|
|
|
install -D -m 0644 etc/icinga/icinga-classic-apache.conf %{buildroot}%{apacheconfdir}/icinga.conf
|
|
|
|
|
2013-12-05 13:15:44 +01:00
|
|
|
# remove features-enabled symlinks
|
|
|
|
rm -f %{buildroot}/%{_sysconfdir}/%{name}/features-enabled/*.conf
|
|
|
|
|
2014-07-04 11:49:51 +02:00
|
|
|
# enable suse rc links
|
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
%if 0%{?use_systemd}
|
|
|
|
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
|
|
|
|
%else
|
|
|
|
ln -sf ../../%{_initrddir}/%{name} "%{buildroot}%{_sbindir}/rc%{name}"
|
|
|
|
%endif
|
|
|
|
mkdir -p "%{buildroot}%{_localstatedir}/adm/fillup-templates/"
|
|
|
|
mv "%{buildroot}%{_sysconfdir}/sysconfig/%{name}" "%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}"
|
|
|
|
%endif
|
|
|
|
|
2015-06-02 13:32:48 +02:00
|
|
|
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
2015-05-07 22:26:42 +02:00
|
|
|
cd tools/selinux
|
|
|
|
for selinuxvariant in %{selinux_variants}
|
|
|
|
do
|
|
|
|
install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
|
|
|
|
install -p -m 644 %{modulename}.pp.${selinuxvariant} \
|
|
|
|
%{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp
|
|
|
|
done
|
|
|
|
cd -
|
|
|
|
|
|
|
|
/usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
|
|
|
|
%endif
|
2014-07-04 11:49:51 +02:00
|
|
|
|
2016-01-11 16:17:01 +01:00
|
|
|
%if 0%{?fedora}
|
|
|
|
mkdir -p "%{buildroot}%{_datadir}/icinga2-studio"
|
|
|
|
install -p -m 644 icinga-studio/icinga.ico %{buildroot}%{_datadir}/icinga2-studio
|
|
|
|
|
|
|
|
mkdir -p "%{buildroot}%{_datadir}/applications"
|
|
|
|
echo "[Desktop Entry]
|
|
|
|
Name=Icinga 2 Studio
|
|
|
|
Comment=API viewer for Icinga 2
|
|
|
|
TryExec=icinga-studio
|
|
|
|
Exec=icinga-studio
|
|
|
|
Icon=/usr/share/icinga2-studio/icinga.ico
|
|
|
|
StartupNotify=true
|
|
|
|
Terminal=false
|
|
|
|
Type=Application
|
|
|
|
Categories=GTK;Utility;
|
|
|
|
Keywords=Monitoring;" > %{buildroot}%{_datadir}/applications/icinga2-studio.desktop
|
|
|
|
%endif
|
|
|
|
|
2015-04-28 19:14:05 +02:00
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
%if 0%{?suse_version} >= 1310
|
|
|
|
install -D -m 0644 tools/syntax/vim/syntax/%{name}.vim %{buildroot}%{_datadir}/vim/vim74/syntax/%{name}.vim
|
|
|
|
install -D -m 0644 tools/syntax/vim/ftdetect/%{name}.vim %{buildroot}%{_datadir}/vim/vim74/ftdetect/%{name}.vim
|
|
|
|
%else
|
|
|
|
install -D -m 0644 tools/syntax/vim/syntax/%{name}.vim %{buildroot}%{_datadir}/vim/vim72/syntax/%{name}.vim
|
|
|
|
install -D -m 0644 tools/syntax/vim/ftdetect/%{name}.vim %{buildroot}%{_datadir}/vim/vim72/ftdetect/%{name}.vim
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
install -D -m 0644 tools/syntax/vim/syntax/%{name}.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/%{name}.vim
|
|
|
|
install -D -m 0644 tools/syntax/vim/ftdetect/%{name}.vim %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/%{name}.vim
|
|
|
|
%endif
|
|
|
|
|
|
|
|
install -D -m 0644 tools/syntax/nano/%{name}.nanorc %{buildroot}%{_datadir}/nano/%{name}.nanorc
|
|
|
|
|
2013-10-08 14:45:35 +02:00
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
|
2013-10-01 19:29:09 +02:00
|
|
|
|
2013-10-08 14:45:35 +02:00
|
|
|
%pre common
|
2013-10-08 16:10:14 +02:00
|
|
|
getent group %{icinga_group} >/dev/null || %{_sbindir}/groupadd -r %{icinga_group}
|
|
|
|
getent group %{icingacmd_group} >/dev/null || %{_sbindir}/groupadd -r %{icingacmd_group}
|
|
|
|
getent passwd %{icinga_user} >/dev/null || %{_sbindir}/useradd -c "icinga" -s /sbin/nologin -r -d %{_localstatedir}/spool/%{name} -G %{icingacmd_group} -g %{icinga_group} %{icinga_user}
|
2014-07-04 11:49:51 +02:00
|
|
|
|
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
%if 0%{?use_systemd}
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
%endif
|
|
|
|
%endif
|
2014-11-20 16:29:17 +01:00
|
|
|
|
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
%verifyscript bin
|
|
|
|
%verify_permissions -e %{_rundir}/%{name}/cmd
|
2015-06-25 17:13:28 +02:00
|
|
|
%endif
|
2014-12-01 20:13:05 +01:00
|
|
|
|
|
|
|
%post bin
|
2015-06-25 17:13:28 +02:00
|
|
|
|
|
|
|
# suse
|
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
|
|
|
|
%if 0%{?suse_version} >= 1310
|
2014-12-01 20:13:05 +01:00
|
|
|
%set_permissions %{_rundir}/%{name}/cmd
|
|
|
|
%endif
|
2015-06-25 17:13:28 +02:00
|
|
|
|
|
|
|
%endif #suse/rhel
|
2014-07-04 11:49:51 +02:00
|
|
|
|
2014-10-28 13:03:13 +01:00
|
|
|
%post common
|
2013-12-05 13:15:44 +01:00
|
|
|
# suse
|
2014-08-14 17:28:06 +02:00
|
|
|
%if "%{_vendor}" == "suse"
|
2014-07-04 11:49:51 +02:00
|
|
|
%if 0%{?use_systemd}
|
|
|
|
%fillup_only %{name}
|
|
|
|
%service_add_post %{name}.service
|
|
|
|
%else
|
2014-06-11 15:52:41 +02:00
|
|
|
%fillup_and_insserv %{name}
|
2014-07-04 11:49:51 +02:00
|
|
|
%endif
|
2013-12-05 13:15:44 +01:00
|
|
|
|
2014-06-11 15:52:41 +02:00
|
|
|
# initial installation, enable default features
|
2014-10-30 14:40:03 +01:00
|
|
|
for feature in checker notification mainlog; do
|
|
|
|
ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
|
|
|
|
done
|
2013-12-05 13:15:44 +01:00
|
|
|
|
|
|
|
exit 0
|
2014-06-11 15:52:41 +02:00
|
|
|
|
2013-11-27 14:10:46 +01:00
|
|
|
%else
|
2014-06-10 13:46:45 +02:00
|
|
|
# rhel
|
2013-11-27 14:10:46 +01:00
|
|
|
|
2014-06-15 17:17:21 +02:00
|
|
|
%if 0%{?use_systemd}
|
2014-05-27 09:26:38 +02:00
|
|
|
%systemd_post %{name}.service
|
2014-06-15 17:17:21 +02:00
|
|
|
%else
|
|
|
|
/sbin/chkconfig --add %{name}
|
2014-05-27 09:26:38 +02:00
|
|
|
%endif
|
2013-12-05 13:15:44 +01:00
|
|
|
|
|
|
|
if [ ${1:-0} -eq 1 ]
|
|
|
|
then
|
|
|
|
# initial installation, enable default features
|
2014-10-30 14:40:03 +01:00
|
|
|
for feature in checker notification mainlog; do
|
|
|
|
ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
|
|
|
|
done
|
2013-12-05 13:15:44 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
2014-06-10 13:46:45 +02:00
|
|
|
%endif
|
|
|
|
# suse/rhel
|
|
|
|
|
2014-11-20 16:29:17 +01:00
|
|
|
%postun common
|
2014-06-10 13:46:45 +02:00
|
|
|
# suse
|
2014-08-14 17:28:06 +02:00
|
|
|
%if "%{_vendor}" == "suse"
|
2014-07-04 11:49:51 +02:00
|
|
|
%if 0%{?using_systemd}
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
%else
|
|
|
|
%restart_on_update %{name}
|
|
|
|
%insserv_cleanup
|
|
|
|
%endif
|
2014-06-10 13:46:45 +02:00
|
|
|
|
|
|
|
%else
|
|
|
|
# rhel
|
|
|
|
|
2014-06-15 17:17:21 +02:00
|
|
|
%if 0%{?use_systemd}
|
|
|
|
%systemd_postun_with_restart %{name}.service
|
|
|
|
%else
|
2013-11-27 14:10:46 +01:00
|
|
|
if [ "$1" -ge "1" ]; then
|
2014-06-11 15:52:41 +02:00
|
|
|
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
|
2013-11-27 14:10:46 +01:00
|
|
|
fi
|
2014-05-27 09:26:38 +02:00
|
|
|
%endif
|
2013-12-05 13:15:44 +01:00
|
|
|
|
2014-07-04 13:00:19 +02:00
|
|
|
%endif
|
|
|
|
# suse / rhel
|
|
|
|
|
2013-12-05 13:15:44 +01:00
|
|
|
if [ "$1" = "0" ]; then
|
|
|
|
# deinstallation of the package - remove enabled features
|
|
|
|
rm -rf %{_sysconfdir}/%{name}/features-enabled
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|
2014-06-10 13:46:45 +02:00
|
|
|
|
2014-11-20 16:29:17 +01:00
|
|
|
%preun common
|
2014-06-10 13:46:45 +02:00
|
|
|
# suse
|
2014-08-14 17:28:06 +02:00
|
|
|
%if "%{_vendor}" == "suse"
|
2014-06-10 13:46:45 +02:00
|
|
|
|
2014-07-04 11:49:51 +02:00
|
|
|
%if 0%{?use_systemd}
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
%else
|
|
|
|
%stop_on_removal %{name}
|
|
|
|
%endif
|
2014-06-11 15:52:41 +02:00
|
|
|
|
|
|
|
exit 0
|
2014-06-10 13:46:45 +02:00
|
|
|
|
|
|
|
%else
|
|
|
|
# rhel
|
|
|
|
|
2014-06-15 17:17:21 +02:00
|
|
|
%if 0%{?use_systemd}
|
|
|
|
%systemd_preun %{name}.service
|
|
|
|
%else
|
2013-11-27 14:10:46 +01:00
|
|
|
if [ "$1" = "0" ]; then
|
2014-06-11 15:52:41 +02:00
|
|
|
/sbin/service %{name} stop > /dev/null 2>&1 || :
|
|
|
|
/sbin/chkconfig --del %{name} || :
|
2013-11-27 14:10:46 +01:00
|
|
|
fi
|
2014-05-27 09:26:38 +02:00
|
|
|
%endif
|
2013-11-27 14:10:46 +01:00
|
|
|
|
2014-06-11 15:52:41 +02:00
|
|
|
exit 0
|
|
|
|
|
2013-11-27 14:10:46 +01:00
|
|
|
%endif
|
2014-06-10 13:46:45 +02:00
|
|
|
# suse / rhel
|
2013-11-27 14:10:46 +01:00
|
|
|
|
2013-10-08 14:45:35 +02:00
|
|
|
%post ido-mysql
|
2013-10-08 16:10:14 +02:00
|
|
|
if [ ${1:-0} -eq 1 ]
|
|
|
|
then
|
|
|
|
# initial installation, enable ido-mysql feature
|
2014-10-30 14:40:03 +01:00
|
|
|
ln -sf ../features-available/ido-mysql.conf %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
|
2013-10-08 16:10:14 +02:00
|
|
|
fi
|
2013-10-08 14:45:35 +02:00
|
|
|
|
2013-11-25 17:35:44 +01:00
|
|
|
exit 0
|
|
|
|
|
2013-10-08 14:45:35 +02:00
|
|
|
%postun ido-mysql
|
2013-10-08 16:10:14 +02:00
|
|
|
if [ "$1" = "0" ]; then
|
|
|
|
# deinstallation of the package - remove feature
|
2014-10-30 14:40:03 +01:00
|
|
|
rm -f %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
|
2013-10-08 16:10:14 +02:00
|
|
|
fi
|
2013-08-16 16:34:24 +02:00
|
|
|
|
2013-11-25 17:35:44 +01:00
|
|
|
exit 0
|
|
|
|
|
2013-11-05 09:54:51 +01:00
|
|
|
%post ido-pgsql
|
|
|
|
if [ ${1:-0} -eq 1 ]
|
|
|
|
then
|
|
|
|
# initial installation, enable ido-pgsql feature
|
2014-10-30 14:40:03 +01:00
|
|
|
ln -sf ../features-available/ido-pgsql.conf %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
|
2013-11-05 09:54:51 +01:00
|
|
|
fi
|
|
|
|
|
2013-11-25 17:35:44 +01:00
|
|
|
exit 0
|
|
|
|
|
2013-11-05 09:54:51 +01:00
|
|
|
%postun ido-pgsql
|
|
|
|
if [ "$1" = "0" ]; then
|
|
|
|
# deinstallation of the package - remove feature
|
2014-10-30 14:40:03 +01:00
|
|
|
rm -f %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
|
2013-11-05 09:54:51 +01:00
|
|
|
fi
|
|
|
|
|
2013-11-25 17:35:44 +01:00
|
|
|
exit 0
|
|
|
|
|
2013-10-17 14:05:12 +02:00
|
|
|
%post classicui-config
|
|
|
|
if [ ${1:-0} -eq 1 ]
|
|
|
|
then
|
|
|
|
# initial installation, enable features
|
2014-10-30 14:40:03 +01:00
|
|
|
for feature in statusdata compatlog command; do
|
|
|
|
ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
|
|
|
|
done
|
2013-10-17 14:05:12 +02:00
|
|
|
fi
|
|
|
|
|
2013-11-25 17:35:44 +01:00
|
|
|
exit 0
|
|
|
|
|
2013-10-17 14:05:12 +02:00
|
|
|
%postun classicui-config
|
|
|
|
if [ "$1" = "0" ]; then
|
|
|
|
# deinstallation of the package - remove feature
|
2014-10-30 14:40:03 +01:00
|
|
|
for feature in statusdata compatlog command; do
|
|
|
|
rm -f %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
|
|
|
|
done
|
2013-10-17 14:05:12 +02:00
|
|
|
fi
|
2012-05-26 14:42:03 +02:00
|
|
|
|
2013-11-25 17:35:44 +01:00
|
|
|
exit 0
|
|
|
|
|
2015-06-02 13:32:48 +02:00
|
|
|
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
2015-05-07 22:26:42 +02:00
|
|
|
%post selinux
|
|
|
|
for selinuxvariant in %{selinux_variants}
|
|
|
|
do
|
|
|
|
/usr/sbin/semodule -s ${selinuxvariant} -i \
|
|
|
|
%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp &> /dev/null || :
|
|
|
|
done
|
|
|
|
/sbin/fixfiles -R icinga2-bin restore &> /dev/null || :
|
|
|
|
/sbin/fixfiles -R icinga2-common restore &> /dev/null || :
|
|
|
|
/sbin/semanage port -a -t icinga2_port_t -p tcp 5665 &> /dev/null || :
|
|
|
|
|
|
|
|
%postun selinux
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
/sbin/semanage port -d -t icinga2_port_t -p tcp 5665 &> /dev/null || :
|
|
|
|
for selinuxvariant in %{selinux_variants}
|
|
|
|
do
|
|
|
|
/usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} &> /dev/null || :
|
|
|
|
done
|
|
|
|
/sbin/fixfiles -R icinga2-bin restore &> /dev/null || :
|
|
|
|
/sbin/fixfiles -R icinga2-common restore &> /dev/null || :
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2014-03-11 08:52:24 +01:00
|
|
|
%files
|
2014-07-05 12:34:31 +02:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING
|
2014-03-11 08:52:24 +01:00
|
|
|
|
2014-03-11 08:26:24 +01:00
|
|
|
%files bin
|
2013-10-13 19:15:52 +02:00
|
|
|
%defattr(-,root,root,-)
|
2014-08-05 21:27:21 +02:00
|
|
|
%doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
|
2014-10-29 13:03:28 +01:00
|
|
|
%{_sbindir}/%{name}
|
2015-03-17 10:42:46 +01:00
|
|
|
%dir %{_libdir}/%{name}/sbin
|
|
|
|
%{_libdir}/%{name}/sbin/%{name}
|
2014-10-29 13:03:28 +01:00
|
|
|
%{_datadir}/%{name}
|
|
|
|
%exclude %{_datadir}/%{name}/include
|
|
|
|
%{_mandir}/man8/%{name}.8.gz
|
|
|
|
|
|
|
|
%attr(0750,%{icinga_user},%{icingacmd_group}) %{_localstatedir}/cache/%{name}
|
|
|
|
%attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}
|
2014-12-20 15:29:04 +01:00
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/log/%{name}/crash
|
2014-10-29 13:03:28 +01:00
|
|
|
%attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}/compat
|
|
|
|
%attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}/compat/archives
|
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %{_localstatedir}/lib/%{name}
|
|
|
|
|
|
|
|
%attr(0750,%{icinga_user},%{icingacmd_group}) %ghost %{_rundir}/%{name}
|
|
|
|
%attr(2750,%{icinga_user},%{icingacmd_group}) %ghost %{_rundir}/%{name}/cmd
|
|
|
|
|
2016-01-11 16:17:01 +01:00
|
|
|
%files libs
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
|
|
|
|
%exclude %{_libdir}/%{name}/libdb_ido_mysql*
|
|
|
|
%exclude %{_libdir}/%{name}/libdb_ido_pgsql*
|
|
|
|
%dir %{_libdir}/%{name}
|
|
|
|
%{_libdir}/%{name}/*.so*
|
|
|
|
|
2014-10-29 13:03:28 +01:00
|
|
|
%files common
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog tools/syntax
|
|
|
|
%attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}
|
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
%{_sysconfdir}/bash_completion.d/%{name}
|
2014-06-15 17:17:21 +02:00
|
|
|
%if 0%{?use_systemd}
|
2014-07-03 17:59:02 +02:00
|
|
|
%attr(644,root,root) %{_unitdir}/%{name}.service
|
2014-06-15 17:17:21 +02:00
|
|
|
%else
|
2014-07-03 17:59:02 +02:00
|
|
|
%attr(755,root,root) %{_sysconfdir}/init.d/%{name}
|
2014-05-27 10:02:22 +02:00
|
|
|
%endif
|
2014-07-04 11:49:51 +02:00
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
%{_sbindir}/rc%{name}
|
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
|
|
|
|
%else
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
|
|
|
%endif
|
2015-05-07 22:26:42 +02:00
|
|
|
%attr(0750,root,%{icinga_group}) %dir %{_sysconfdir}/%{name}
|
2013-10-08 16:10:14 +02:00
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/conf.d
|
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/features-available
|
2015-01-12 14:53:21 +01:00
|
|
|
%exclude %{_sysconfdir}/%{name}/features-available/ido-*.conf
|
2013-10-08 16:10:14 +02:00
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/features-enabled
|
2014-10-24 14:24:59 +02:00
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/repository.d
|
2013-11-27 09:45:04 +01:00
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/scripts
|
2014-10-27 19:18:17 +01:00
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/repository.d
|
2014-05-13 13:49:00 +02:00
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/zones.d
|
2013-10-15 22:39:00 +02:00
|
|
|
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/%{name}.conf
|
2015-05-07 22:26:42 +02:00
|
|
|
%config(noreplace) %attr(0640,root,%{icinga_group}) %{_sysconfdir}/%{name}/init.conf
|
2014-03-31 18:17:40 +02:00
|
|
|
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/constants.conf
|
2014-05-22 21:00:42 +02:00
|
|
|
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.conf
|
2013-10-15 22:39:00 +02:00
|
|
|
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/conf.d/*.conf
|
|
|
|
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/*.conf
|
2014-10-27 19:18:17 +01:00
|
|
|
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/repository.d/*
|
2014-05-13 14:18:00 +02:00
|
|
|
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.d/*
|
2013-11-27 09:45:04 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/scripts/*
|
2014-12-01 19:52:34 +01:00
|
|
|
%dir %{_libexecdir}/%{name}
|
2014-12-01 19:51:11 +01:00
|
|
|
%{_libexecdir}/%{name}/prepare-dirs
|
2014-12-11 09:27:31 +01:00
|
|
|
%{_libexecdir}/%{name}/safe-reload
|
2013-10-08 16:10:14 +02:00
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}
|
2015-04-27 13:54:36 +02:00
|
|
|
%attr(0770,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
|
2013-11-21 07:17:34 +01:00
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp
|
2014-05-10 18:23:08 +02:00
|
|
|
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/%{name}/include
|
|
|
|
%{_datadir}/%{name}/include
|
2013-10-08 14:45:35 +02:00
|
|
|
|
|
|
|
%files doc
|
2013-10-13 19:15:52 +02:00
|
|
|
%defattr(-,root,root,-)
|
2013-10-11 11:20:33 +02:00
|
|
|
%{_datadir}/doc/%{name}
|
|
|
|
%docdir %{_datadir}/doc/%{name}
|
2013-10-08 14:45:35 +02:00
|
|
|
|
2013-10-01 19:29:09 +02:00
|
|
|
%files ido-mysql
|
2013-10-13 19:15:52 +02:00
|
|
|
%defattr(-,root,root,-)
|
2014-08-17 13:20:39 +02:00
|
|
|
%doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
|
2015-02-25 09:30:51 +01:00
|
|
|
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/ido-mysql.conf
|
2013-10-01 19:29:09 +02:00
|
|
|
%{_libdir}/%{name}/libdb_ido_mysql*
|
2014-08-17 13:20:39 +02:00
|
|
|
%{_datadir}/icinga2-ido-mysql
|
2013-05-04 17:49:28 +02:00
|
|
|
|
2013-11-05 09:54:51 +01:00
|
|
|
%files ido-pgsql
|
|
|
|
%defattr(-,root,root,-)
|
2014-08-17 13:20:39 +02:00
|
|
|
%doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
|
2015-02-25 09:30:51 +01:00
|
|
|
%config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/ido-pgsql.conf
|
2013-11-05 09:54:51 +01:00
|
|
|
%{_libdir}/%{name}/libdb_ido_pgsql*
|
2014-08-17 13:20:39 +02:00
|
|
|
%{_datadir}/icinga2-ido-pgsql
|
2013-11-05 09:54:51 +01:00
|
|
|
|
2013-10-10 16:43:15 +02:00
|
|
|
%files classicui-config
|
2013-10-13 19:15:52 +02:00
|
|
|
%defattr(-,root,root,-)
|
2013-11-26 14:21:40 +01:00
|
|
|
%attr(0751,%{icinga_user},%{icinga_group}) %dir %{icingaclassicconfdir}
|
2013-10-10 16:43:15 +02:00
|
|
|
%config(noreplace) %{icingaclassicconfdir}/cgi.cfg
|
|
|
|
%config(noreplace) %{apacheconfdir}/icinga.conf
|
2013-10-14 00:24:13 +02:00
|
|
|
%config(noreplace) %attr(0640,root,%{apachegroup}) %{icingaclassicconfdir}/passwd
|
2013-10-10 16:43:15 +02:00
|
|
|
|
2015-06-02 13:32:48 +02:00
|
|
|
%if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
2015-05-07 22:26:42 +02:00
|
|
|
%files selinux
|
|
|
|
%defattr(-,root,root,0755)
|
2015-06-01 13:29:55 +02:00
|
|
|
%doc tools/selinux/*
|
2015-05-07 22:26:42 +02:00
|
|
|
%{_datadir}/selinux/*/%{modulename}.pp
|
|
|
|
%endif
|
|
|
|
|
2016-01-11 16:17:01 +01:00
|
|
|
%if 0%{?fedora}
|
|
|
|
%files studio
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_bindir}/icinga-studio
|
|
|
|
%{_datadir}/icinga2-studio
|
|
|
|
%{_datadir}/applications/icinga2-studio.desktop
|
|
|
|
%endif
|
|
|
|
|
2015-04-28 19:14:05 +02:00
|
|
|
%files -n vim-icinga2
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
%if 0%{?suse_version} >= 1310
|
|
|
|
%{_datadir}/vim/vim74/syntax/%{name}.vim
|
|
|
|
%{_datadir}/vim/vim74/ftdetect/%{name}.vim
|
|
|
|
%else
|
|
|
|
%{_datadir}/vim/vim72/syntax/%{name}.vim
|
|
|
|
%{_datadir}/vim/vim72/ftdetect/%{name}.vim
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
%{_datadir}/vim/vimfiles/syntax/%{name}.vim
|
|
|
|
%{_datadir}/vim/vimfiles/ftdetect/%{name}.vim
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -n nano-icinga2
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_datadir}/nano/%{name}.nanorc
|
|
|
|
|
2013-05-04 17:49:28 +02:00
|
|
|
%changelog
|