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