mirror of https://github.com/Icinga/icinga2.git
spec: Update for latest changes, part 1.
refs #4772 refs #4653 refs #4533
This commit is contained in:
parent
98032b2a71
commit
ddfe45031b
|
@ -1,14 +1,18 @@
|
||||||
|
%define revision 1
|
||||||
|
%define opensuse_boost_version 1_49_0
|
||||||
|
|
||||||
|
%define logmsg logger -t %{name}/rpm
|
||||||
|
|
||||||
Summary: network monitoring application
|
Summary: network monitoring application
|
||||||
Name: @PACKAGE@
|
Name: @PACKAGE@
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Release: 1%{?dist}
|
Release: %{revision}%{?dist}
|
||||||
License: GPL
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Source: %{name}-%{version}.tar.gz
|
Source: %{name}-%{version}.tar.gz
|
||||||
URL: http://www.icinga.org/
|
URL: http://www.icinga.org/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
BuildRequires: docbook-simple
|
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
@ -20,29 +24,82 @@ BuildRequires: libtool
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
|
|
||||||
|
|
||||||
# TODO: figure out how to handle boost on el5
|
# TODO: figure out how to handle boost on el5
|
||||||
BuildRequires: boost
|
%if "%{_vendor}" == "redhat"
|
||||||
BuildRequires: boost-devel
|
BuildRequires: boost >= 1.41
|
||||||
BuildRequires: boost-test
|
BuildRequires: boost-devel >= 1.41
|
||||||
|
BuildRequires: boost-test >= 1.41
|
||||||
|
|
||||||
|
Requires: boost >= 1.41
|
||||||
|
%endif
|
||||||
|
%if "%{_vendor}" == "suse"
|
||||||
|
BuildRequires: boost-devel >= 1.41
|
||||||
|
Requires: libboost_program_options%{opensuse_boost_version}
|
||||||
|
Requires: libboost_signals%{opensuse_boost_version}
|
||||||
|
Requires: libboost_system%{opensuse_boost_version}
|
||||||
|
Requires: libboost_test%{opensuse_boost_version}
|
||||||
|
Requires: libboost_thread%{opensuse_boost_version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Icinga is a general-purpose network monitoring application.
|
Icinga is a general-purpose network monitoring application.
|
||||||
|
|
||||||
|
%package ido-mysql
|
||||||
|
Summary: ido mysql database backend for Icinga 2
|
||||||
|
Group: Applications/System
|
||||||
|
%if "%{_vendor}" == "suse"
|
||||||
|
BuildRequires: libmysqlclient-devel
|
||||||
|
Requires: libmysqlclient18
|
||||||
|
%endif
|
||||||
|
%if "%{_vendor}" == "redhat"
|
||||||
|
BuildRequires: mysql-devel
|
||||||
|
Requires: mysql
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description ido-mysql
|
||||||
|
Icinga 2 IDO mysql database backend. Compatible with Icinga 1.x
|
||||||
|
IDOUtils schema >= 1.10
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
sh autogen.sh
|
%configure --with-icinga-user=$USER \
|
||||||
%configure
|
--with-icinga-group=$USER \
|
||||||
|
--with-icingacmd-user=$USER \
|
||||||
|
--with-icingacmd-group=$USER
|
||||||
|
|
||||||
|
# http://fedoraproject.org/wiki/RPath_Packaging_Draft
|
||||||
|
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||||
|
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
|
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
|
||||||
make install DESTDIR=%{buildroot}
|
make install \
|
||||||
|
DESTDIR="%{buildroot}" \
|
||||||
|
INSTALL_OPTS="" \
|
||||||
|
COMMAND_OPTS=""
|
||||||
|
|
||||||
# dist config
|
%pre
|
||||||
mv %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf.dist %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
%{_sbindir}/groupadd icinga 2> /dev/null || :
|
||||||
|
%{_sbindir}/groupadd icingacmd 2> /dev/null || :
|
||||||
|
%{_sbindir}/useradd -c "icinga" -s /sbin/nologin -r -d %{_localstatedir}/spool/%{name} -G icingacmd -g icinga icinga 2> /dev/null || :
|
||||||
|
|
||||||
|
%post
|
||||||
|
/sbin/chkconfig --add %{name}
|
||||||
|
/sbin/service %{name} start &>/dev/null || :
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
/sbin/service %{name} stop &>/dev/null || :
|
||||||
|
/sbin/chkconfig --del %{name}
|
||||||
|
fi
|
||||||
|
|
||||||
|
%postun
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
|
[ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
|
||||||
|
@ -52,8 +109,12 @@ mv %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf.dist %{buildroot}%{_sysconfdi
|
||||||
%doc README AUTHORS ChangeLog COPYING COPYING.Exceptions
|
%doc README AUTHORS ChangeLog COPYING COPYING.Exceptions
|
||||||
%{_sysconfdir}/%{name}
|
%{_sysconfdir}/%{name}
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/%{name}/conf.d/*.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/%{name}/features-available/*.conf
|
||||||
%attr(755,-,-) %{_sysconfdir}/init.d/%{name}
|
%attr(755,-,-) %{_sysconfdir}/init.d/%{name}
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
|
%{_sbindir}/i2enfeature
|
||||||
|
%exclude %{_libdir}/%{name}/libdb_ido_mysql*
|
||||||
%{_libdir}/%{name}
|
%{_libdir}/%{name}
|
||||||
%{_datadir}/doc/%{name}
|
%{_datadir}/doc/%{name}
|
||||||
%{_datadir}/%{name}
|
%{_datadir}/%{name}
|
||||||
|
@ -67,9 +128,16 @@ mv %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf.dist %{buildroot}%{_sysconfdi
|
||||||
%{_localstatedir}/spool/%{name}
|
%{_localstatedir}/spool/%{name}
|
||||||
%{_localstatedir}/spool/%{name}/perfdata
|
%{_localstatedir}/spool/%{name}/perfdata
|
||||||
|
|
||||||
|
%attr(2755,icinga,icingacmd) %{_localstatedir}/run/icinga2/cmd
|
||||||
|
|
||||||
|
%files ido-mysql
|
||||||
|
%{_libdir}/%{name}/libdb_ido_mysql*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 01 2013 Michael Friedrich <michael.friedrich@netways.de> - 0.0.3-1
|
||||||
|
- revamp package
|
||||||
|
|
||||||
* Sat May 04 2013 Michael Friedrich <michael.friedrich@netways.de> - 0.0.2-1
|
* Sat May 04 2013 Michael Friedrich <michael.friedrich@netways.de> - 0.0.2-1
|
||||||
- new initscript in initdir
|
- new initscript in initdir
|
||||||
- itl is installed into datadir
|
- itl is installed into datadir
|
||||||
|
|
Loading…
Reference in New Issue