2 # _with_pgsql - enable pgsql (instead of mysql) support
3 # _without_sql - without pgsql nor mysql support
4 # _without_gd - without statusmap and trends, which require gd library
5 %{!?_without_sql:%{!?_with_pgsql:%define _with_mysql 1}}
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://west.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}%{_beta}.tar.gz
18 Source1: %{name}-apache.conf
20 Patch0: %{name}-pgsql.patch
21 URL: http://www.nagios.org/
22 %{!?_without_gd:BuildRequires: gd-devel}
23 %{?_with_pgsql:BuildRequires: postgresql-devel}
24 %{?_with_mysql:BuildRequires: mysql-devel}
26 Prereq: /sbin/chkconfig
27 Prereq: %{_sbindir}/useradd
28 Prereq: %{_bindir}/getgid
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Nagios is a program that will monitor hosts and services on your
36 network. It has the ability to email or page you when a problem arises
37 and when a problem is resolved. Nagios is written in C and is
38 designed to run under Linux (and some other *NIX variants) as a
39 background process, intermittently running checks on various services
42 The actual service checks are performed by separate "plugin" programs
43 which return the status of the checks to Nagios. The plugins are
44 available in nagios-plugins packages.
46 Nagios is successor to NetSaint.
49 Nagios to program, który monitoruje serwery oraz us³ugi w naszej
50 sieci. Posiada on mo¿liwo¶æ wysy³ania informacji o wyst±pieniu oraz
51 rozwi±zaniu problemu. Nagios zosta³ napisany w C oraz jest
52 zaprojektowany do pracy pod Linuksem (i niektórymi innymi uniksami)
53 jako proces pracuj±cy w tle i bezustannie wykonuj±cy pewne operacje
56 W³a¶ciwe sprawdzanie jest wykonywane przez osobne programy
57 ("wtyczki"), które zwracaj± informacje o statusie do Nagiosa.
58 Wtyczki s± dostêpne na stronie w pakietach nagios-plugins.
60 Nagios jest nastêpc± NetSainta.
63 O Nagios é um programa que monitora máquinas e serviços na sua rede.
64 Ele pode enviar um email ou um aviso de pager para o administrador
65 quando surgir um problema e quando ele for resolvido. Nagios é
66 escrito em C e foi desenvolvido para rodar em plataformas Linux (e
67 algumas variações de *NIX) como um processo em segundo plano,
68 periodicamente executando checagens nos diversos serviços que forem
72 Summary: CGI webinterface for Nagios
73 Summary(pl): Interfejs WWW/CGI dla Nagiosa
78 CGI webinterface for Nagios
81 Summary: Include files that Netsaint-related applications may compile against
82 Summary(pl): Pliki nag³ówkowe, wykorzystywane przez aplikacje nagiosa
83 Summary(pt_BR): Arquivos de cabeçalho necessários para desenvolvimento de aplicativos para o Nagios
84 Group: Development/Libraries
87 This package provides include files that Netsaint-related applications
90 %description devel -l pl
91 Ten pakiet dostarcza pliki nag³ówkowe, które mog± byæ wykorzystywane
92 przez aplikacje zwi±zane z nagiosem podczas kompilacji.
94 %description devel -l pt_BR
95 Este pacote contém arquivos de cabeçalho usados no desenvolvimento de
96 aplicativos para o Nagios.
99 %setup -q -n %{name}-%{version}%{_beta}
104 --with-nagios-user=%{name} \
105 --with-nagios-grp=%{name} \
106 --with-command-user=nobody \
107 --with-command-grp=nobody \
108 --with-init-dir=/etc/rc.d/init.d \
109 --with-lockfile=/var/run/%{name}.pid \
110 --with-gd-lib=%{_libdir} \
111 --with-gd-inc=%{_includedir} \
112 --with-cgiurl=/nagios/cgi-bin \
113 --with-htmurl=/nagios \
114 --with-ping_command='/usr/sbin/ping -n %%s -c %%d' \
115 %{?_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} \
116 %{?_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} \
117 %{?_without_gd:--disable-statusmap --disable-trends} \
118 --exec-prefix=%{_sbindir} \
119 --bindir=%{_sbindir} \
120 --sbindir=%{_libdir}/%{name}/cgi \
121 --libexecdir=%{_libdir}/%{name}/plugins \
122 --datadir=%{_datadir}/%{name} \
123 --sysconfdir=/etc/nagios \
124 --localstatedir=/var/lib/%{name}
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,httpd}
131 install -d $RPM_BUILD_ROOT%{_includedir}/%{name}
132 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
133 install -d $RPM_BUILD_ROOT%{_var}/log/%{name}
135 install common/locations.h $RPM_BUILD_ROOT%{_includedir}/%{name}
137 %{__make} install install-html install-config install-init install-commandmode fullinstall \
138 DESTDIR=$RPM_BUILD_ROOT \
143 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/%{name}.conf
144 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
146 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}command.cfg
149 rm -rf $RPM_BUILD_ROOT
152 if [ -n "`getgid %{name}`" ]; then
153 if [ "`getgid %{name}`" != "72" ]; then
154 echo "Warning: group %{name} haven't gid=72. Correct this before installing %{name}" 1>&2
158 %{_sbindir}/groupadd -g 72 -f %{name}
160 if [ -n "`id -u %{name} 2>/dev/null`" ]; then
161 if [ "`id -u %{name}`" != "72" ]; then
162 echo "Warning: user %{name} haven't uid=72. Correct this before installing %{name}" 1>&2
166 %{_sbindir}/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{name} %{name} 1>&2
170 /sbin/chkconfig --add %{name}
171 if [ -f %{_var}/lock/subsys/%{name} ]; then
172 %{_sysconfdir}/rc.d/init.d/%{name} restart 1>&2
176 if [ "$1" = "0" ] ; then
177 if [ -f %{_var}/lock/subsys/%{name} ]; then
178 %{_sysconfdir}/rc.d/init.d/%{name} stop 1>&2
180 /sbin/chkconfig --del %{name}
184 if [ "$1" = "0" ]; then
185 %{_sbindir}/userdel %{name}
186 %{_sbindir}/groupdel %{name}
190 %defattr(644,root,root,755)
191 %doc Changelog README* UPGRADING contrib/database
192 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
193 %attr(751,root,nagios) %dir %{_sysconfdir}/%{name}
194 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/nagios.cfg-sample
195 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/checkcommands.cfg-sample
196 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/contactgroups.cfg-sample
197 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/contacts.cfg-sample
198 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/dependencies.cfg-sample
199 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/escalations.cfg-sample
200 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/hostgroups.cfg-sample
201 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/hosts.cfg-sample
202 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/misccommands.cfg-sample
203 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/resource.cfg-sample
204 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/services.cfg-sample
205 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/timeperiods.cfg-sample
206 %dir %{_libdir}/%{name}
207 %dir %{_libdir}/%{name}/plugins
208 %attr(755,root,root) %{_sbindir}/%{name}
209 %attr(771,nagios,http) %{_var}/log/%{name}
212 %defattr(644,root,root,755)
213 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/%{name}.conf
214 %attr(644,root,http) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/cgi.cfg-sample
215 %dir %{_libdir}/%{name}/cgi
216 %attr(755,root,root) %{_libdir}/%{name}/cgi/*.cgi
220 %defattr(644,root,root,755)
221 %dir %{_includedir}/%{name}
222 %{_includedir}/%{name}/*.h