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://www.nagios.org/download/%{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}
27 Prereq: /sbin/chkconfig
28 Prereq: %{_sbindir}/useradd
29 Prereq: %{_bindir}/getgid
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 Nagios is a program that will monitor hosts and services on your
37 network. It has the ability to email or page you when a problem arises
38 and when a problem is resolved. Nagios is written in C and is
39 designed to run under Linux (and some other *NIX variants) as a
40 background process, intermittently running checks on various services
43 The actual service checks are performed by separate "plugin" programs
44 which return the status of the checks to Nagios. The plugins are
45 available in nagios-plugins packages.
48 Nagios to program, który monitoruje serwery oraz us³ugi w naszej
49 sieci. Posiada on mo¿liwo¶æ wysy³ania informacji o wyst±pieniu oraz
50 rozwi±zaniu problemu. Nagios zosta³ napisany w C oraz jest
51 zaprojektowany do pracy pod Linuksem (i niektórymi innymi uniksami)
52 jako proces pracuj±cy w tle i bezustannie wykonuj±cy pewne operacje
55 W³a¶ciwe sprawdzanie jest wykonywane przez osobne programy
56 ("wtyczki"), które zwracaj± informacje o statusie do Nagiosa.
57 Wtyczki s± dostêpne na stronie w pakietach nagios-plugins.
60 O Nagios é um programa que monitora máquinas e serviços na sua rede.
61 Ele pode enviar um email ou um aviso de pager para o administrador
62 quando surgir um problema e quando ele for resolvido. Nagios é
63 escrito em C e foi desenvolvido para rodar em plataformas Linux (e
64 algumas variações de *NIX) como um processo em segundo plano,
65 periodicamente executando checagens nos diversos serviços que forem
69 Summary: CGI webinterface for Nagios
70 Summary(pl): Interfejs WWW/CGI dla Nagiosa
74 CGI webinterface for Nagios
77 Summary: Include files that Netsaint-related applications may compile against
78 Summary(pl): Pliki nag³ówkowe, wykorzystywane przez aplikacje nagiosa
79 Summary(pt_BR): Arquivos de cabeçalho necessários para desenvolvimento de aplicativos para o Nagios
80 Group: Development/Libraries
83 This package provides include files that Netsaint-related applications
86 %description devel -l pl
87 Ten pakiet dostarcza pliki nag³ówkowe, które mog± byæ wykorzystywane
88 przez aplikacje zwi±zane z nagiosem podczas kompilacji.
90 %description devel -l pt_BR
91 Este pacote contém arquivos de cabeçalho usados no desenvolvimento de
92 aplicativos para o Nagios.
95 %setup -q -n %{name}-%{version}%{_beta}
100 --with-nagios-user=%{name} \
101 --with-nagios-grp=%{name} \
102 --with-command-user=nobody \
103 --with-command-grp=nobody \
104 --with-init-dir=/etc/rc.d/init.d \
105 --with-lockfile=/var/run/%{name}.pid \
106 --with-gd-lib=%{_libdir} \
107 --with-gd-inc=%{_includedir} \
108 --with-cgiurl=/nagios/cgi-bin \
109 --with-htmurl=/nagios \
110 --with-ping_command='/usr/sbin/ping -n %%s -c %%d' \
111 %{?_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} \
112 %{?_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} \
113 %{?_without_gd:--disable-statusmap --disable-trends} \
114 --exec-prefix=%{_sbindir} \
115 --bindir=%{_sbindir} \
116 --sbindir=%{_libdir}/%{name}/cgi \
117 --libexecdir=%{_libdir}/%{name}/plugins \
118 --datadir=%{_datadir}/%{name} \
119 --sysconfdir=/etc/nagios \
120 --localstatedir=/var/lib/%{name}
125 rm -rf $RPM_BUILD_ROOT
126 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,httpd}
127 install -d $RPM_BUILD_ROOT%{_includedir}/%{name}
128 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins
129 install -d $RPM_BUILD_ROOT%{_var}/log/%{name}
131 install common/locations.h $RPM_BUILD_ROOT%{_includedir}/%{name}
133 %{__make} install install-html install-config install-init install-commandmode fullinstall \
134 DESTDIR=$RPM_BUILD_ROOT \
139 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/%{name}.conf
140 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
142 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}command.cfg
145 rm -rf $RPM_BUILD_ROOT
148 if [ -n "`getgid %{name}`" ]; then
149 if [ "`getgid %{name}`" != "72" ]; then
150 echo "Warning: group %{name} haven't gid=72. Correct this before installing %{name}" 1>&2
154 %{_sbindir}/groupadd -g 72 -f %{name}
156 if [ -n "`id -u %{name} 2>/dev/null`" ]; then
157 if [ "`id -u %{name}`" != "72" ]; then
158 echo "Warning: user %{name} haven't uid=72. Correct this before installing %{name}" 1>&2
162 %{_sbindir}/useradd -u 72 -d %{_libdir}/%{name} -s /bin/false -c "%{name} User" -g %{name} %{name} 1>&2
166 /sbin/chkconfig --add %{name}
167 if [ -f %{_var}/lock/subsys/%{name} ]; then
168 %{_sysconfdir}/rc.d/init.d/%{name} restart 1>&2
172 if [ "$1" = "0" ] ; then
173 if [ -f %{_var}/lock/subsys/%{name} ]; then
174 %{_sysconfdir}/rc.d/init.d/%{name} stop 1>&2
176 /sbin/chkconfig --del %{name}
180 if [ "$1" = "0" ]; then
181 %{_sbindir}/userdel %{name}
182 %{_sbindir}/groupdel %{name}
186 %defattr(644,root,root,755)
187 %doc Changelog README* UPGRADING contrib/database
188 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
189 %attr(751,root,nagios) %dir %{_sysconfdir}/%{name}
190 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/nagios.cfg-sample
191 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/checkcommands.cfg-sample
192 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/contactgroups.cfg-sample
193 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/contacts.cfg-sample
194 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/dependencies.cfg-sample
195 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/escalations.cfg-sample
196 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/hostgroups.cfg-sample
197 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/hosts.cfg-sample
198 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/misccommands.cfg-sample
199 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/resource.cfg-sample
200 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/services.cfg-sample
201 %attr(644,root,nagios) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/timeperiods.cfg-sample
202 %dir %{_libdir}/%{name}
203 %dir %{_libdir}/%{name}/plugins
204 %attr(755,root,root) %{_sbindir}/%{name}
205 %attr(771,nagios,http) %{_var}/log/%{name}
208 %defattr(644,root,root,755)
209 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/%{name}.conf
210 %attr(644,root,http) %config(noreplace) %verify(not size mtime md5) /etc/%{name}/cgi.cfg-sample
211 %dir %{_libdir}/%{name}/cgi
212 %attr(755,root,root) %{_libdir}/%{name}/cgi/*.cgi
216 %defattr(644,root,root,755)
217 %dir %{_includedir}/%{name}
218 %{_includedir}/%{name}/*.h