Align icinga2.spec file consistently
This commit is contained in:
parent
d79cfb907e
commit
0d8a1af253
183
icinga2.spec
183
icinga2.spec
|
@ -77,95 +77,95 @@
|
|||
|
||||
%define logmsg logger -t %{name}/rpm
|
||||
|
||||
Summary: Network monitoring application
|
||||
Name: icinga2
|
||||
Version: 2.8.1
|
||||
Release: %{revision}%{?dist}
|
||||
License: GPLv2+
|
||||
URL: https://www.icinga.com/
|
||||
Group: System/Monitoring
|
||||
Source: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz
|
||||
Summary: Network monitoring application
|
||||
Name: icinga2
|
||||
Version: 2.8.1
|
||||
Release: %{revision}%{?dist}
|
||||
License: GPLv2+
|
||||
Url: https://www.icinga.com/
|
||||
Group: System/Monitoring
|
||||
Source: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: %{name}-bin = %{version}-%{release}
|
||||
Requires: %{name}-bin = %{version}-%{release}
|
||||
|
||||
%description
|
||||
Meta package for Icinga 2 Core, DB IDO and Web.
|
||||
|
||||
%package bin
|
||||
Summary: Icinga 2 binaries and libraries
|
||||
Group: System/Monitoring
|
||||
Summary: Icinga 2 binaries and libraries
|
||||
Group: System/Monitoring
|
||||
|
||||
%if "%{_vendor}" == "suse"
|
||||
PreReq: permissions
|
||||
Provides: monitoring_daemon
|
||||
Recommends: monitoring-plugins
|
||||
PreReq: permissions
|
||||
Provides: monitoring_daemon
|
||||
Recommends: monitoring-plugins
|
||||
%if 0%{?suse_version} >= 1310
|
||||
BuildRequires: libyajl-devel
|
||||
BuildRequires: libyajl-devel
|
||||
%endif
|
||||
%endif
|
||||
BuildRequires: libedit-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: libedit-devel
|
||||
BuildRequires: ncurses-devel
|
||||
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
|
||||
BuildRequires: gcc48-c++
|
||||
BuildRequires: libstdc++48-devel
|
||||
BuildRequires: libopenssl1-devel
|
||||
BuildRequires: gcc48-c++
|
||||
BuildRequires: libopenssl1-devel
|
||||
BuildRequires: libstdc++48-devel
|
||||
%else
|
||||
%if "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
||||
# Requires devtoolset-2 scl
|
||||
BuildRequires: devtoolset-2-gcc-c++
|
||||
BuildRequires: devtoolset-2-libstdc++-devel
|
||||
BuildRequires: devtoolset-2-binutils
|
||||
BuildRequires: devtoolset-2-binutils
|
||||
BuildRequires: devtoolset-2-gcc-c++
|
||||
BuildRequires: devtoolset-2-libstdc++-devel
|
||||
%define scl_enable scl enable devtoolset-2 --
|
||||
%else
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libstdc++-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libstdc++-devel
|
||||
%endif
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: openssl-devel
|
||||
%endif
|
||||
BuildRequires: cmake
|
||||
BuildRequires: flex >= 2.5.35
|
||||
BuildRequires: bison
|
||||
BuildRequires: make
|
||||
BuildRequires: bison
|
||||
BuildRequires: cmake
|
||||
BuildRequires: flex >= 2.5.35
|
||||
BuildRequires: make
|
||||
|
||||
%if 0%{?build_icinga_org} && "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
||||
# el5 and el6 require packages.icinga.com
|
||||
BuildRequires: boost153-devel
|
||||
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
|
||||
BuildRequires: boost153-devel
|
||||
%else
|
||||
%if "%{_vendor}" == "suse" && 0%{?suse_version} > 1320
|
||||
BuildRequires: libboost_thread-devel >= 1.48
|
||||
BuildRequires: libboost_program_options-devel >= 1.48
|
||||
BuildRequires: libboost_regex-devel >= 1.48
|
||||
BuildRequires: libboost_system-devel >= 1.48
|
||||
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%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
|
||||
# Requires EPEL repository
|
||||
BuildRequires: boost148-devel >= 1.48
|
||||
BuildRequires: boost148-devel >= 1.48
|
||||
%else
|
||||
BuildRequires: boost-devel >= 1.48
|
||||
BuildRequires: boost-devel >= 1.48
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?use_systemd}
|
||||
BuildRequires: systemd-devel
|
||||
Requires: systemd
|
||||
BuildRequires: systemd-devel
|
||||
Requires: systemd
|
||||
%endif
|
||||
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description bin
|
||||
Icinga 2 is a general-purpose network monitoring application.
|
||||
This subpackage provides the binaries for Icinga 2 Core.
|
||||
|
||||
%package common
|
||||
Summary: Common Icinga 2 configuration
|
||||
Group: System/Monitoring
|
||||
Summary: Common Icinga 2 configuration
|
||||
Group: System/Monitoring
|
||||
%if (0%{?amzn} || 0%{?fedora} || 0%{?rhel})
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): shadow-utils
|
||||
|
@ -195,36 +195,36 @@ among Icinga 2 related packages.
|
|||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for Icinga 2
|
||||
Group: Documentation/Other
|
||||
Summary: Documentation for Icinga 2
|
||||
Group: Documentation/Other
|
||||
|
||||
%description doc
|
||||
This subpackage provides documentation for Icinga 2.
|
||||
|
||||
|
||||
%package libs
|
||||
Summary: Libraries for Icinga 2
|
||||
Group: System/Libraries
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
Summary: Libraries for Icinga 2
|
||||
Group: System/Libraries
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
|
||||
%description libs
|
||||
This subpackage provides the internal libraries for the daemon.
|
||||
|
||||
|
||||
%package ido-mysql
|
||||
Summary: IDO MySQL database backend for Icinga 2
|
||||
Group: System/Monitoring
|
||||
Summary: IDO MySQL database backend for Icinga 2
|
||||
Group: System/Monitoring
|
||||
%if "%{_vendor}" == "suse"
|
||||
BuildRequires: libmysqlclient-devel
|
||||
BuildRequires: libmysqlclient-devel
|
||||
%if 0%{?suse_version} >= 1310
|
||||
BuildRequires: mysql-devel
|
||||
BuildRequires: mysql-devel
|
||||
%endif
|
||||
|
||||
%else
|
||||
BuildRequires: mysql-devel
|
||||
BuildRequires: mysql-devel
|
||||
%endif #suse
|
||||
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description ido-mysql
|
||||
Icinga 2 IDO mysql database backend. Compatible with Icinga 1.x
|
||||
|
@ -232,14 +232,14 @@ IDOUtils schema >= 1.12
|
|||
|
||||
|
||||
%package ido-pgsql
|
||||
Summary: IDO PostgreSQL database backend for Icinga 2
|
||||
Group: System/Monitoring
|
||||
Summary: IDO PostgreSQL database backend for Icinga 2
|
||||
Group: System/Monitoring
|
||||
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
|
||||
BuildRequires: postgresql-devel >= 8.4
|
||||
BuildRequires: postgresql-devel >= 8.4
|
||||
%else
|
||||
BuildRequires: postgresql-devel
|
||||
BuildRequires: postgresql-devel
|
||||
%endif
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description ido-pgsql
|
||||
Icinga 2 IDO PostgreSQL database backend. Compatible with Icinga 1.x
|
||||
|
@ -252,7 +252,9 @@ IDOUtils schema >= 1.12
|
|||
%package selinux
|
||||
Summary: SELinux policy module supporting icinga2
|
||||
Group: System/Base
|
||||
BuildRequires: checkpolicy, selinux-policy-devel, hardlink
|
||||
BuildRequires: checkpolicy
|
||||
BuildRequires: hardlink
|
||||
BuildRequires: selinux-policy-devel
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires(post): policycoreutils-python
|
||||
Requires(postun): policycoreutils-python
|
||||
|
@ -261,15 +263,14 @@ Requires(postun): policycoreutils-python
|
|||
SELinux policy module supporting icinga2
|
||||
%endif
|
||||
|
||||
|
||||
%package -n vim-icinga2
|
||||
Summary: Vim syntax highlighting for icinga2
|
||||
Group: Productivity/Text/Editors
|
||||
Summary: Vim syntax highlighting for icinga2
|
||||
Group: Productivity/Text/Editors
|
||||
%if "%{_vendor}" == "suse"
|
||||
BuildRequires: vim
|
||||
Requires: vim
|
||||
BuildRequires: vim
|
||||
Requires: vim
|
||||
%else
|
||||
Requires: vim-filesystem
|
||||
Requires: vim-filesystem
|
||||
%endif
|
||||
|
||||
%description -n vim-icinga2
|
||||
|
@ -277,9 +278,9 @@ Vim syntax highlighting for icinga2
|
|||
|
||||
|
||||
%package -n nano-icinga2
|
||||
Summary: Nano syntax highlighting for icinga2
|
||||
Group: Productivity/Text/Editors
|
||||
Requires: nano
|
||||
Summary: Nano syntax highlighting for icinga2
|
||||
Group: Productivity/Text/Editors
|
||||
Requires: nano
|
||||
|
||||
%description -n nano-icinga2
|
||||
Nano syntax highlighting for icinga2
|
||||
|
@ -359,7 +360,7 @@ cd -
|
|||
|
||||
%install
|
||||
make install \
|
||||
DESTDIR="%{buildroot}"
|
||||
DESTDIR="%{buildroot}"
|
||||
|
||||
# install custom limits.conf for systemd
|
||||
%if 0%{?configure_systemd_limits}
|
||||
|
@ -444,10 +445,10 @@ getent passwd %{icinga_user} >/dev/null || %{_sbindir}/useradd -c "icinga" -s /s
|
|||
|
||||
if [ ${1:-0} -eq 1 ]
|
||||
then
|
||||
# initial installation, enable default features
|
||||
for feature in checker notification mainlog; do
|
||||
ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
|
||||
done
|
||||
# initial installation, enable default features
|
||||
for feature in checker notification mainlog; do
|
||||
ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -463,10 +464,10 @@ exit 0
|
|||
|
||||
if [ ${1:-0} -eq 1 ]
|
||||
then
|
||||
# initial installation, enable default features
|
||||
for feature in checker notification mainlog; do
|
||||
ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
|
||||
done
|
||||
# initial installation, enable default features
|
||||
for feature in checker notification mainlog; do
|
||||
ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -491,7 +492,7 @@ exit 0
|
|||
%systemd_postun_with_restart %{name}.service
|
||||
%else
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
|
||||
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
|
@ -499,8 +500,8 @@ fi
|
|||
# suse / rhel
|
||||
|
||||
if [ "$1" = "0" ]; then
|
||||
# deinstallation of the package - remove enabled features
|
||||
rm -rf %{_sysconfdir}/%{name}/features-enabled
|
||||
# deinstallation of the package - remove enabled features
|
||||
rm -rf %{_sysconfdir}/%{name}/features-enabled
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -524,8 +525,8 @@ exit 0
|
|||
%systemd_preun %{name}.service
|
||||
%else
|
||||
if [ "$1" = "0" ]; then
|
||||
/sbin/service %{name} stop > /dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del %{name} || :
|
||||
/sbin/service %{name} stop > /dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del %{name} || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
|
@ -537,16 +538,16 @@ exit 0
|
|||
%post ido-mysql
|
||||
if [ ${1:-0} -eq 1 ]
|
||||
then
|
||||
# initial installation, enable ido-mysql feature
|
||||
ln -sf ../features-available/ido-mysql.conf %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
|
||||
# initial installation, enable ido-mysql feature
|
||||
ln -sf ../features-available/ido-mysql.conf %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
%postun ido-mysql
|
||||
if [ "$1" = "0" ]; then
|
||||
# deinstallation of the package - remove feature
|
||||
rm -f %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
|
||||
# deinstallation of the package - remove feature
|
||||
rm -f %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -554,16 +555,16 @@ exit 0
|
|||
%post ido-pgsql
|
||||
if [ ${1:-0} -eq 1 ]
|
||||
then
|
||||
# initial installation, enable ido-pgsql feature
|
||||
ln -sf ../features-available/ido-pgsql.conf %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
|
||||
# initial installation, enable ido-pgsql feature
|
||||
ln -sf ../features-available/ido-pgsql.conf %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
%postun ido-pgsql
|
||||
if [ "$1" = "0" ]; then
|
||||
# deinstallation of the package - remove feature
|
||||
rm -f %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
|
||||
# deinstallation of the package - remove feature
|
||||
rm -f %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue