]> granicus.if.org Git - icinga2/blobdiff - icinga2.spec
Improve SELinux documentation
[icinga2] / icinga2.spec
index 37775dc6bc9e49ca0954b235a85f0f1d458bc567..2204d60558557ddc47983d1ca0c31acf7347a537 100644 (file)
@@ -1,6 +1,6 @@
 #/******************************************************************************
 # * Icinga 2                                                                   *
-# * Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/)  *
+# * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/)  *
 # *                                                                            *
 # * 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.4.10
+Version: 2.6.2
 Release: %{revision}%{?dist}
 License: GPL-2.0+
 Group: Applications/System
 Source: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz
-URL: https://www.icinga.org/
+URL: https://www.icinga.com/
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires: %{name}-bin = %{version}-%{release}
 
@@ -94,7 +94,7 @@ BuildRequires: libedit-devel
 BuildRequires: ncurses-devel
 %if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
 BuildRequires: gcc48-c++
-BuildRequires: libstdc++47-devel
+BuildRequires: libstdc++48-devel
 BuildRequires: libopenssl1-devel
 %else
 BuildRequires: gcc-c++
@@ -107,21 +107,14 @@ BuildRequires: bison
 BuildRequires: make
 %if 0%{?fedora}
 BuildRequires: wxGTK3-devel
-BuildRequires: firewalld-filesystem
-Requires: firewalld-filesystem
-Requires(post): firewalld-filesystem
-%endif
-%if 0%{?rhel} == 7
-Requires: firewalld
-Requires(post): firewalld
 %endif
 
 %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.org
+# el5 and el6 require packages.icinga.com
 BuildRequires: boost153-devel
 %else
 %if 0%{?build_icinga_org} && "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
-# sles 11 sp3 requires packages.icinga.org
+# sles 11 sp3 requires packages.icinga.com
 BuildRequires: boost153-devel
 %else
 BuildRequires: boost-devel >= 1.41
@@ -196,7 +189,11 @@ IDOUtils schema >= 1.12
 %package ido-pgsql
 Summary:      IDO PostgreSQL database backend for Icinga 2
 Group:        Applications/System
+%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
+BuildRequires: postgresql-devel >= 8.4
+%else
 BuildRequires: postgresql-devel
+%endif
 Requires: %{name} = %{version}-%{release}
 
 %description ido-pgsql
@@ -253,6 +250,27 @@ Provides a GUI for the Icinga 2 API.
 %endif
 
 
+%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
+
 %prep
 %setup -q -n %{name}-%{version}
 
@@ -261,6 +279,7 @@ CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
          -DCMAKE_INSTALL_SYSCONFDIR=/etc \
          -DCMAKE_INSTALL_LOCALSTATEDIR=/var \
          -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+         -DICINGA2_LTO_BUILD=ON \
          -DCMAKE_VERBOSE_MAKEFILE=ON \
          -DBoost_NO_BOOST_CMAKE=ON \
          -DICINGA2_RUNDIR=%{_rundir} \
@@ -273,7 +292,7 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_STUDIO=true"
 %if "%{_vendor}" == "redhat"
 %if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
 # Boost_VERSION 1.41.0 vs 101400 - disable build tests
-# details in https://dev.icinga.org/issues/5033
+# details in https://dev.icinga.com/issues/5033
 CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost153 \
  -DBOOST_INCLUDEDIR=/usr/include/boost153 \
  -DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
@@ -373,11 +392,21 @@ Categories=GTK;Utility;
 Keywords=Monitoring;" > %{buildroot}%{_datadir}/applications/icinga2-studio.desktop
 %endif
 
-%if 0%{?fedora} || 0%{?rhel} == 7
-mkdir -p %{buildroot}%{_prefix}/lib/firewalld/services
-install -p -m 644 tools/firewalld/%{name}.xml %{buildroot}%{_prefix}/lib/firewalld/services
+%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
+
 %clean
 [ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
 
@@ -408,14 +437,6 @@ getent passwd %{icinga_user} >/dev/null || %{_sbindir}/useradd -c "icinga" -s /s
 
 %endif #suse/rhel
 
-%if 0%{?fedora}
-%firewalld_reload
-%endif
-%if 0%{?rhel} == 7
-test -f /usr/bin/firewall-cmd && firewall-cmd --reload --quiet || :
-%endif
-
-
 %post common
 # suse
 %if "%{_vendor}" == "suse"
@@ -618,10 +639,6 @@ fi
 %attr(0750,%{icinga_user},%{icingacmd_group}) %ghost %{_rundir}/%{name}
 %attr(2750,%{icinga_user},%{icingacmd_group}) %ghost %{_rundir}/%{name}/cmd
 
-%if 0%{?fedora} || 0%{?rhel} == 7
-%{_prefix}/lib/firewalld/services/%{name}.xml
-%endif
-
 %files libs
 %defattr(-,root,root,-)
 %doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
@@ -715,4 +732,23 @@ fi
 %{_datadir}/applications/icinga2-studio.desktop
 %endif
 
+%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
+
 %changelog