3 %bcond_with pgsql # enable pgsql support
4 %bcond_with mysql # enable mysql support
5 %bcond_without gd # without statusmap and trends, which require gd library
8 # - remove *-sample from /etc - move it to %doc or place without "-sample" suffix
9 Summary: Host/service/network monitoring program
10 Summary(pl): Program do monitorowania serwerów/us³ug/sieci
11 Summary(pt_BR): Programa para monitoração de máquinas e serviços
17 Source0: http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
18 # Source0-md5: 414d70e5269d5b8d7c21bf3ee129309f
19 Source1: %{name}-apache.conf
21 Patch0: %{name}-pgsql.patch
22 Patch1: %{name}-resources.patch
23 Patch2: %{name}-iconv-in-libc.patch
24 URL: http://www.nagios.org/
25 BuildRequires: autoconf
26 BuildRequires: automake
27 %{?with_gd:BuildRequires: gd-devel}
28 %{?with_mysql:BuildRequires: mysql-devel}
29 %{?with_pgsql:BuildRequires: postgresql-devel}
32 Requires(pre): /usr/bin/getgid
33 Requires(pre): /bin/id
34 Requires(pre): /usr/sbin/groupadd
35 Requires(pre): /usr/sbin/useradd
36 Requires(post,postun): /sbin/chkconfig
37 Provides: user(%{name})
38 Provides: group(%{name})
39 Conflicts: iputils-ping < 1:ss020124
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define _sysconfdir /etc/%{name}
44 %define _bindir %{_prefix}/sbin
45 %define _sbindir %{_libdir}/%{name}/cgi
46 %define _datadir %{_prefix}/share/%{name}
47 %define _localstatedir /var/lib/%{name}
50 Nagios is a program that will monitor hosts and services on your
51 network. It has the ability to email or page you when a problem arises
52 and when a problem is resolved. Nagios is written in C and is designed
53 to run under Linux (and some other *NIX variants) as a background
54 process, intermittently running checks on various services that you
57 The actual service checks are performed by separate "plugin" programs
58 which return the status of the checks to Nagios. The plugins are
59 available in nagios-plugins packages.
61 Nagios is successor to NetSaint.
64 Nagios to program, który monitoruje serwery oraz us³ugi w naszej
65 sieci. Posiada on mo¿liwo¶æ wysy³ania informacji o wyst±pieniu oraz
66 rozwi±zaniu problemu. Nagios zosta³ napisany w C oraz jest
67 zaprojektowany do pracy pod Linuksem (i niektórymi innymi uniksami)
68 jako proces pracuj±cy w tle i bezustannie wykonuj±cy pewne operacje
71 W³a¶ciwe sprawdzanie jest wykonywane przez osobne programy
72 ("wtyczki"), które zwracaj± informacje o statusie do Nagiosa. Wtyczki
73 s± dostêpne na stronie w pakietach nagios-plugins.
75 Nagios jest nastêpc± NetSainta.
78 O Nagios é um programa que monitora máquinas e serviços na sua rede.
79 Ele pode enviar um email ou um aviso de pager para o administrador
80 quando surgir um problema e quando ele for resolvido. Nagios é escrito
81 em C e foi desenvolvido para rodar em plataformas Linux (e algumas
82 variações de *NIX) como um processo em segundo plano, periodicamente
83 executando checagens nos diversos serviços que forem especificados.
86 Summary: CGI webinterface for Nagios
87 Summary(pl): Interfejs WWW/CGI dla Nagiosa
89 # for dirs... and accessing local logs(?)
90 Requires: %{name} = %{version}-%{release}
94 CGI webinterface for Nagios.
96 %description cgi -l pl
97 Interfejs CGI dla Nagiosa.
100 Summary: Include files that Netsaint-related applications may compile against
101 Summary(pl): Pliki nag³ówkowe, wykorzystywane przez aplikacje nagiosa
102 Summary(pt_BR): Arquivos de cabeçalho necessários para desenvolvimento de aplicativos para o Nagios
103 Group: Development/Libraries
104 # doesn't require base
107 This package provides include files that Netsaint-related applications
110 %description devel -l pl
111 Ten pakiet dostarcza pliki nag³ówkowe, które mog± byæ wykorzystywane
112 przez aplikacje zwi±zane z nagiosem podczas kompilacji.
114 %description devel -l pt_BR
115 Este pacote contém arquivos de cabeçalho usados no desenvolvimento de
116 aplicativos para o Nagios.
120 %{?with_pgsql:%patch0 -p1}
128 --with-nagios-user=%{name} \
129 --with-nagios-grp=%{name} \
130 --with-command-user=nobody \
131 --with-command-grp=nobody \
132 --with-lockfile=/var/run/%{name}.pid \
133 --with-ping_command='/bin/ping -n %%s -c %%d' \
134 %{?with_mysql:--with-mysql-xdata --with-mysql-status --with-mysql-comments --with-mysql-extinfo --with-mysql-retention --with-mysql-downtime --with-mysql-lib=%{_libdir} --with-mysql-inc=%{_includedir}/mysql} \
135 %{?with_pgsql:--with-pgsql-xdata --with-pgsql-status --with-pgsql-comments --with-pgsql-extinfo --with-pgsql-retention --with-pgsql-downtime--with-pgsql-lib=%{_libdir} --with-pgsql-inc=%{_includedir}/postgresql} \
136 %{!?with_gd:--disable-statusmap --disable-trends}
141 rm -rf $RPM_BUILD_ROOT
142 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,httpd},%{_includedir}/%{name},%{_libdir}/%{name}/plugins} \
143 $RPM_BUILD_ROOT{%{_var}/log/%{name},%{_localstatedir}}
145 install common/locations.h $RPM_BUILD_ROOT%{_includedir}/%{name}
147 %{__make} install install-html install-config install-init install-commandmode fullinstall \
148 DESTDIR=$RPM_BUILD_ROOT \
153 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
154 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
157 rm -rf $RPM_BUILD_ROOT
160 if [ -n "`getgid %{name}`" ]; then
161 if [ "`getgid %{name}`" != "72" ]; then
162 echo "Error: group %{name} doesn't have gid=72. Correct this before installing %{name}." 1>&2
166 /usr/sbin/groupadd -g 72 -f %{name}
168 if [ -n "`id -u %{name} 2>/dev/null`" ]; then
169 if [ "`id -u %{name}`" != "72" ]; then
170 echo "Error: user %{name} doesn't have uid=72. Correct this before installing %{name}." 1>&2
174 /usr/sbin/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{name} %{name} 1>&2
178 /sbin/chkconfig --add %{name}
179 if [ -f /var/lock/subsys/%{name} ]; then
180 /etc/rc.d/init.d/%{name} restart 1>&2
184 if [ "$1" = "0" ] ; then
185 if [ -f /var/lock/subsys/%{name} ]; then
186 /etc/rc.d/init.d/%{name} stop 1>&2
188 /sbin/chkconfig --del %{name}
192 if [ "$1" = "0" ]; then
198 %defattr(644,root,root,755)
199 %doc Changelog README* UPGRADING contrib/database
200 %attr(754,root,root) /etc/rc.d/init.d/%{name}
201 %attr(751,root,nagios) %dir %{_sysconfdir}
202 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/[!c]*
203 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/c[!g]*
204 %dir %{_libdir}/%{name}
205 %dir %{_libdir}/%{name}/plugins
206 %attr(755,root,root) %{_bindir}/%{name}
207 %attr(771,nagios,http) %{_var}/log/%{name}
208 %attr(775,nagios,nagios) %dir %{_localstatedir}
209 %attr(775,nagios,nagios) %dir %{_localstatedir}/archives
210 %attr(2775,nagios,http) %dir %{_localstatedir}/rw
213 %defattr(644,root,root,755)
214 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
215 %attr(644,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/cgi.cfg-sample
216 %dir %{_libdir}/%{name}/cgi
217 %attr(755,root,root) %{_libdir}/%{name}/cgi/*.cgi
221 %defattr(644,root,root,755)
222 %dir %{_includedir}/%{name}
223 %{_includedir}/%{name}/*.h