]> git.pld-linux.org Git - packages/nagios-plugins.git/blob - nagios-plugins.spec
- default configs for each plugin; rel 11
[packages/nagios-plugins.git] / nagios-plugins.spec
1 # NOTE TO PLD DEVELOPERS:
2 # - if you use any plugin from -contrib package, move it to subpackage or main
3 #   package so we can support it better!
4 # TODO:
5 # - package requisites for unifished packages -nsclient and -nwstat
6 #   REQUIREMENTS explains the dependencies.
7 %include        /usr/lib/rpm/macros.perl
8 Summary:        Host/service/network monitoring program plugins for Nagios
9 Summary(pl.UTF-8):      Wtyczki do monitorowania hostów/usług/sieci dla Nagiosa
10 Name:           nagios-plugins
11 Version:        1.4.13
12 Release:        11
13 License:        GPL v2
14 Group:          Networking
15 Source0:        http://dl.sourceforge.net/nagiosplug/%{name}-%{version}.tar.gz
16 # Source0-md5:  be6cc7699fff3ee29d1fd4d562377386
17 Source1:        %{name}-config-20090803.tar.bz2
18 # Source1-md5:  32e01fc7e51b942232f10604966227e2
19 Source2:        nagios-utils.php
20 #Patch:         %{name}-shared.patch # needs finishing
21 Patch0:         %{name}-tainted.patch
22 Patch1:         %{name}-contrib-API.patch
23 Patch3:         %{name}-subst.patch
24 Patch4:         %{name}-noroot.patch
25 Patch5:         %{name}-check_ping-socket-filter-warning.patch
26 Patch6:         %{name}-path.patch
27 Patch7:         %{name}-pgsql.patch
28 Patch8:         %{name}-checkircd.patch
29 Patch9:         %{name}-check_log_paths.patch
30 Patch10:        %{name}-check_game_cmdline.patch
31 Patch11:        %{name}-check_smb_hostaddress.patch
32 Patch12:        %{name}-implicit-basename.patch
33 Patch13:        %{name}-check_radius_segfault.patch
34 Patch17:        %{name}-check_ldap_pointer.patch
35 Patch18:        %{name}-configure.patch
36 Patch19:        %{name}-perlautodep.patch
37 Patch20:        %{name}-cosmetic.patch
38 Patch21:        %{name}-check_hpjd-no-paper-out.patch
39 Patch22:        %{name}-check_snmp_procs-fix.patch
40 Patch23:        %{name}-check_disk_smb-zero-cap.patch
41 Patch24:        %{name}-paths.patch
42 Patch25:        %{name}-check_snmp_disk_monitor-bulk.patch
43 Patch26:        %{name}-check_snmp_disk_monitor-opts.patch
44 URL:            http://www.nagiosplugins.org/
45 BuildRequires:  autoconf
46 BuildRequires:  automake
47 BuildRequires:  file
48 BuildRequires:  gettext-devel >= 0.14.3
49 BuildRequires:  libtool
50 BuildRequires:  mysql-devel
51 BuildRequires:  net-snmp-devel
52 BuildRequires:  openldap-devel >= 2.3.0
53 BuildRequires:  openssl-devel >= 0.9.7d
54 BuildRequires:  perl-Net-SNMP
55 BuildRequires:  postgresql-devel
56 BuildRequires:  radiusclient-devel
57 BuildRequires:  rpm-perlprov >= 4.1-13
58 BuildRequires:  rpm-pythonprov
59 BuildRequires:  rpmbuild(macros) >= 1.177
60 Requires:       nagios-core
61 Obsoletes:      netsaint-plugins
62 Conflicts:      nagios < 3.1.2-3
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 %define         _sysconfdir             /etc/nagios/plugins
66 %define         _pluginarchdir  %{_libdir}/nagios/plugins
67 %define         _pluginlibdir   %{_prefix}/lib/nagios/plugins
68 %define         _noautoprovfiles        utils.pm
69 %define         _noautoreq      'perl(DBD::Oracle)' 'perl(Net::Arping)' 'perl(RRD::File)' 'perl(a)' 'perl(packet_utils)' 'perl(snmputil)' 'perl(utils)'
70
71 %description
72 Nagios is a program that will monitor hosts and services on your
73 network, and to email or page you when a problem arises or is
74 resolved. Nagios runs on a Unix server as a background or daemon
75 process, intermittently running checks on various services that you
76 specify. The actual service checks are performed by separate "plugin"
77 programs which return the status of the checks to Nagios.
78
79 This package contains the basic plugins necessary for use with the
80 nagios package.
81
82 %description -l pl.UTF-8
83 Nagios to program monitorujący hosty i usługi w sieci i powiadamiający
84 pocztą elektroniczną lub na pager o wystąpieniu lub rozwiązaniu
85 problemów. Nagios działa na serwerze uniksowym w tle lub jako demon,
86 regularnie przeprowadzając kontrolę różnych podanych mu usług. Sama
87 kontrola usług jest wykonywana poprzez oddzielne "wtyczki" - programy
88 zwracajace stan danej usługi do Nagiosa.
89
90 Ten pakiet zawiera podstawowe wtyczki do używania z pakietem nagios.
91
92 %package libs
93 Summary:        Nagios plugins base libraries
94 Summary(pl.UTF-8):      Podstawowe biblioteki wtyczek Nagiosa
95 Group:          Networking
96
97 %description libs
98 This package contains nagios plugins base libraries that plugins
99 depend on.
100
101 %description libs -l pl.UTF-8
102 Ten pakiet zawiera podstawowe biblioteki wtyczek Nagiosa, wymagane
103 przez wtyczki.
104
105 %package devel
106 Summary:        Include files that Nagios plugins may compile against
107 Group:          Development/Libraries
108 # doesn't require base
109
110 %description devel
111 This package provides include files that Nagios plugins may compile
112 against.
113
114 # NOTE for sub package requires:
115 # Requires:     nagios-core for plugins directory
116 # and add Requires:     %{name}-libs = %{version}-%{release} for utils.{sh,pm,php}
117 %package snmp
118 Summary:        Nagios plugins using SNMP protocol to query information
119 Summary(pl.UTF-8):      Wtyczki Nagiosa używające protokołu SNMP w celu uzyskania informacji
120 Group:          Networking
121 # for utils.pm
122 Requires:       %{name}-libs = %{version}-%{release}
123 Requires:       net-snmp-utils
124 Requires:       perl-Net-SNMP
125
126 %description snmp
127 Nagios plugins using SNMP protocol to query information.
128
129 %description snmp -l pl.UTF-8
130 Wtyczki Nagiosa używające protokołu SNMP w celu uzyskania informacji.
131
132 %package samba
133 Summary:        Nagios plugin to check remote disk using smbclient
134 Summary(pl.UTF-8):      Wtyczka Nagiosa do zdalnego sprawdzania dysku z użyciem smbclienta
135 Group:          Networking
136 # for utils.pm
137 Requires:       %{name}-libs = %{version}-%{release}
138 Requires:       samba-client
139
140 %description samba
141 Perl Check SMB Disk plugin for Nagios.
142
143 %description samba -l pl.UTF-8
144 Perlowa wtyczka dla Nagiosa sprawdzająca dyski SMB.
145
146 %package -n nagios-plugin-check_sensors
147 Summary:        Nagios plugin to check hardware status using the lm_sensors package
148 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania stanu sprzętu przy użyciu pakietu lm_sensors
149 Group:          Networking
150 # for utils.sh
151 Requires:       %{name}-libs = %{version}-%{release}
152 Requires:       lm_sensors
153 Provides:       nagios-plugins-sensors = %{version}-%{release}
154 Obsoletes:      nagios-plugins-sensors
155
156 %description -n nagios-plugin-check_sensors
157 This plugin checks hardware status using the lm_sensors package.
158
159 %description -n nagios-plugin-check_sensors -l pl.UTF-8
160 Ta wtyczka sprawdza stan sprzętu przy użyciu pakietu lm_sensors.
161
162 %package mysql
163 Summary:        Nagios plugin to test a MySQL DBMS
164 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania systemu baz danych MySQL
165 Group:          Networking
166 Requires:       nagios-core
167
168 %description mysql
169 This plugin tests a MySQL DBMS to determine whether it is active and
170 accepting queries.
171
172 %description mysql -l pl.UTF-8
173 Ta wtyczka sprawdza serwer baz danych MySQL, aby określić, czy jest
174 aktywny i przyjmuje zapytania.
175
176 %package -n nagios-plugin-check_pgsql
177 Summary:        Nagios plugin to test a PostgreSQL DBMS
178 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania systemu baz danych PostgreSQL
179 Group:          Networking
180 Requires:       nagios-core
181 Provides:       nagios-plugins-pgsql = %{version}-%{release}
182 Obsoletes:      nagios-plugins-pgsql
183
184 %description -n nagios-plugin-check_pgsql
185 This plugin tests a PostgreSQL DBMS to determine whether it is active
186 and accepting queries. In its current operation, it simply connects to
187 the specified database, and then disconnects. If no database is
188 specified, it connects to the template1 database, which is present in
189 every functioning PostgreSQL DBMS.
190
191 %description -n nagios-plugin-check_pgsql -l pl.UTF-8
192 Ta wtyczka sprawdza serwer baz danych PostgreSQL, aby określić, czy
193 jest aktywny i przyjmuje zapytania. Aktualnie po prostu łączy się do
194 określonej bazy danych i rozłącza. Jeśli nie podano bazy danych, łączy
195 się do bazy danych template1, obecnej w każdym działającym systemie
196 PostgreSQL.
197
198 %package -n nagios-plugin-check_radius
199 Summary:        Nagios plugin to test a radius server to see if it is accepting connections
200 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania serwera radius pod kątem przyjmowania połączeń
201 Group:          Networking
202 Requires:       nagios-core
203 Requires:       radiusclient
204 Provides:       nagios-plugins-radius = %{version}-%{release}
205 Obsoletes:      nagios-plugins-radius
206
207 %description -n nagios-plugin-check_radius
208 This plugin tests a radius server to see if it is accepting
209 connections.
210
211 %description -n nagios-plugin-check_radius -l pl.UTF-8
212 Ta wtyczka sprawdza serwer usługi radius, aby zobaczyć, czy przyjmuje
213 połączenia.
214
215 %package -n nagios-plugin-check_game
216 Summary:        Nagios plugin to check status of Internet game servers
217 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania stanu serwerów gier internetowych
218 Group:          Networking
219 Requires:       nagios-core
220 Requires:       qstat
221 Provides:       nagios-plugins-qstat = %{version}-%{release}
222 Obsoletes:      nagios-plugins-qstat
223
224 %description -n nagios-plugin-check_game
225 This plugin uses the 'qstat' command, the popular game server status
226 query tool.
227
228 QStat is a command-line program that displays information about
229 Internet game servers.
230
231 The servers are either down, non-responsive, or running a game. For
232 servers running a game, the server name, map name, current number of
233 players, and response time are displayed. Server rules and player
234 information may also be displayed.
235
236 %description -n nagios-plugin-check_game -l pl.UTF-8
237 Ta wtyczka używa polecenia 'qstat' - popularnego narzędzia do zapytań
238 o stan serwerów gier.
239
240 QStat to program działający z linii poleceń wyświetlający informacje o
241 serwerach gier internetowych.
242
243 Serwery mogą być wyłączone, nie odpowiadać, bądź mieć uruchomioną grę.
244 Dla serwerów z grami wyświetlanea są: nazwa serwera, nazwa mapy,
245 aktualna liczba graczy i czas odpowiedzi. Mogą być dodatkowo
246 wyświetlone reguły serwera i informacje o graczach.
247
248 %package -n nagios-plugin-check_ldap
249 Summary:        Nagios plugin to check LDAP servers
250 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania serwerów LDAP
251 Group:          Networking
252 Requires:       nagios-core
253 Provides:       nagios-plugins-ldap = %{version}-%{release}
254 Obsoletes:      nagios-plugins-ldap
255
256 %description -n nagios-plugin-check_ldap
257 Nagios plugin to check LDAP servers.
258
259 %description -n nagios-plugin-check_ldap -l pl.UTF-8
260 Wtyczka Nagiosa do sprawdzania serwerów LDAP.
261
262 %package -n nagios-plugin-check_ntp
263 Summary:        Nagios plugin to check time using NTP protocol
264 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania czasu przy użyciu protokołu NTP
265 Group:          Networking
266 # for utils.pm
267 Requires:       %{name}-libs = %{version}-%{release}
268 Requires:       ntp-client
269 Provides:       nagios-plugins-ntp = %{version}-%{release}
270 Obsoletes:      nagios-plugins-ntp
271
272 %description -n nagios-plugin-check_ntp
273 Checks the local timestamp offset versus <host> with ntpdate. Checks
274 the jitter/dispersion of clock signal between <host> and its sys.peer
275 with ntpq.
276
277 %description -n nagios-plugin-check_ntp -l pl.UTF-8
278 Ta wtyczka sprawdza przesunięcie lokalnego czasu względem danego hosta
279 przy użyciu ntpdate. Sprawdza wahania/dyspersję sygnału zegara
280 pomiędzy hostem a jego sys.peer przy użyciu ntpq.
281
282 %package -n nagios-plugin-check_dns
283 Summary:        Nagios plugin to check DNS with nslookup
284 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania DNS-u przy użyciu nslookup
285 Group:          Networking
286 Requires:       bind-utils
287 Requires:       nagios-core
288 Provides:       nagios-plugins-dns = %{version}-%{release}
289 Obsoletes:      nagios-plugins-dns
290
291 %description -n nagios-plugin-check_dns
292 This plugin uses the nslookup program to obtain the IP address for the
293 given host/domain query. A optional DNS server to use may be
294 specified. If no DNS server is specified, the default server(s)
295 specified in /etc/resolv.conf will be used.
296
297 %description -n nagios-plugin-check_dns -l pl.UTF-8
298 Ta wtyczka używa programu nslookup do uzyskania adresu IP danego dla
299 danego zapytania o host/domenę. Można opcjonalnie podać serwer DNS,
300 który ma być użyty. Jeśli nie podano serwera DNS, używany jest
301 domyślny serwer (lub serwery) podany w /etc/resolv.conf.
302
303 %package -n nagios-plugin-check_dig
304 Summary:        Nagios plugin to check DNS servers with dig
305 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania DNS-u przy użyciu programu dig
306 Group:          Networking
307 Requires:       bind-utils
308 Requires:       nagios-core
309 Provides:       nagios-plugins-dig = %{version}-%{release}
310 Obsoletes:      nagios-plugins-dig
311
312 %description -n nagios-plugin-check_dig
313 Test the DNS service on the specified host using dig.
314
315 %description -n nagios-plugin-check_dig -l pl.UTF-8
316 Ta wtyczka sprawdza usługę DNS na podanym hoście przy użyciu programu
317 dig.
318
319 %package ssh
320 Summary:        Nagios plugins to check remote services via SSH
321 Summary(pl.UTF-8):      Wtyczki Nagiosa do sprawdzania zdalnych usług po SSH
322 Group:          Networking
323 Requires:       nagios-core
324 Requires:       openssh-clients
325
326 %description ssh
327 This plugin uses SSH to execute commands on a remote host.
328
329 %description ssh -l pl.UTF-8
330 Ta wtyczka używa SSH do wykonywania poleceń na zdalnym hoście.
331
332 %package -n nagios-plugin-check_load
333 Summary:        Nagios plugin to check uptime using procps
334 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania uptime'u przy użyciu procps
335 Group:          Networking
336 Requires:       nagios-core
337 Requires:       procps
338 Provides:       nagios-plugins-procps = %{version}-%{release}
339 Obsoletes:      nagios-plugins-procps
340
341 %description -n nagios-plugin-check_load
342 Nagios plugin to check uptime using procps.
343
344 %description -n nagios-plugin-check_load -l pl.UTF-8
345 Wtyczka Nagiosa do sprawdzania uptime'u przy użyciu procps.
346
347 %package -n nagios-plugin-check_fping
348 Summary:        Nagios plugin to check host up state with fping
349 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania działania hosta przy użyciu programu fping
350 Group:          Networking
351 Requires:       fping
352 Requires:       nagios-core
353 Provides:       nagios-plugins-fping = %{version}-%{release}
354 Obsoletes:      nagios-plugins-fping
355
356 %description -n nagios-plugin-check_fping
357 This plugin will use the /bin/fping command to ping the specified host
358 for a fast check if the host is alive.
359
360 %description -n nagios-plugin-check_fping -l pl.UTF-8
361 Ta wtyczka używa polecenia /bin/fping do szybkiego sprawdzenia, czy
362 dany host działa.
363
364 %package -n nagios-plugin-check_ping
365 Summary:        Nagios plugin to check host up state with ping
366 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania działania hosta przy użyciu programu ping
367 Group:          Networking
368 Requires:       iputils-ping >= 1:s20070202-1
369 Requires:       nagios-core
370
371 %description -n nagios-plugin-check_ping
372 This plugin will use the /bin/ping command to ping the specified host
373 if the host is alive.
374
375 %description -n nagios-plugin-check_ping -l pl.UTF-8
376 Ta wtyczka używa polecenia /bin/ping do sprawdzenia, czy dany host
377 działa.
378
379 %package perl
380 Summary:        Nagios plugins written in Perl
381 Summary(pl.UTF-8):      Wtyczki Nagiosa napisane w Perlu
382 Group:          Networking
383 # for utils.pm
384 Requires:       %{name}-libs = %{version}-%{release}
385 # for perl(Exporter)
386 Requires:       perl-base
387
388 %description perl
389 This package contains Nagios plugins written in Perl.
390
391 %description perl -l pl.UTF-8
392 Ten pakiet zawiera wtyczki Nagiosa napisane w Perlu.
393
394 # nsclient not packaged in PLD
395 %package nsclient
396 Summary:        Nagios plugin to check NT server with NSClient
397 Summary(pl):    Wtyczka Nagiosa do sprawdzania serwera NT przy użyciu NSClienta
398 Group:          Networking
399 Requires:       %{name}-libs = %{version}-%{release}
400 Requires:       nsclient
401
402 %description nsclient
403 Nagios plugin to check NT server with NSClient.
404
405 %description nsclient -l pl
406 Wtyczka Nagiosa do sprawdzania serwera NT przy użyciu NSClienta.
407
408 # requisite not packaged in PLD
409 %package nwstat
410 Summary:        Nagios plugin nwstat
411 Summary(pl):    Wtyczka nwstat do Nagiosa
412 Group:          Networking
413 Requires:       %{name}-libs = %{version}-%{release}
414 Requires:       mrtgext
415
416 %description nwstat
417 Nagios plugin using MRTGEXT module
418 <http://forge.novell.com/modules/xfmod/project/?mrtgext>.
419
420 %description nwstat -l pl
421 Wtyczka nagiosa używająca modułu MRTGEXT
422 <http://forge.novell.com/modules/xfmod/project/?mrtgext>.
423
424 %package contrib
425 Summary:        Contributed nagios plugins
426 Summary(pl.UTF-8):      Wtyczki przekazane do projektu Nagios
427 Group:          Networking
428 # for utils.pm, utils.sh, utils.py
429 Requires:       %{name}-libs = %{version}-%{release}
430 # check_apache
431 Requires:       perl-URI
432 Requires:       perl-libwww
433 # check_apc_ups
434 Requires:       net-snmp-utils
435 # check_arping
436 Requires:       perl-Net-Arping
437 # check_bgpstate
438 Requires:       perl-Net-SNMP
439 Requires:       whois
440 # check_traceroute
441 Requires:       traceroute
442 # check_traceroute-pure_perl
443 Requires:       perl-Net-Traceroute
444 # check_temp_fsc
445 Requires:       perl-SNMP_Session
446 # check_smart
447 Requires:       smartmontools
448 # check_smb
449 Requires:       samba
450 # check_adptraid
451 #Requires:      dptutil
452 # unfinished... more deps are actually needed.
453
454 %description contrib
455 Contributed nagios plugins. Some of them work, some do not. Use at
456 your own risk.
457
458 %description contrib -l pl.UTF-8
459 Wtyczki przekazane do projektu Nagios. Część z nich działa, część nie.
460
461 %prep
462 %setup -q -a1
463 mv nagios-plugins-config-*/* .
464 %patch0 -p1
465 %patch1 -p1
466 %patch3 -p1
467 %patch4 -p1
468 %patch5 -p1
469 %patch6 -p1
470 %patch7 -p1
471 %patch8 -p1
472 %patch10 -p1
473 %patch11 -p1
474 %patch12 -p1
475 %patch13 -p1
476 %patch17 -p1
477 %patch18 -p1
478 %patch19 -p1
479 %patch20 -p1
480 %patch21 -p0
481 %patch22 -p0
482 %patch23 -p0
483 %patch24 -p1
484 %patch25 -p0
485 %patch26 -p0
486
487 # bring contribs into shape...
488 cd contrib
489 mv check_compaq_insight.{pl,msg}
490 sed -ne '/--- cut ---/,/--- cut ---/{/--- cut ---/!p}' < \
491         check_compaq_insight.msg > check_compaq_insight.pl
492
493 sed -i -e '1s,#!.*/bin/perl,#!%{__perl},' \
494         check_{oracle_tbs,{snmp_{{disk,process}_monitor,printer},nagios_db,flexlm}.pl}
495
496 sed -i -e '1s,#!.*/bin/env,#!%{__python},' \
497         check_pcpmetric.py
498
499 sed -i -e '1s,#!.*/bin/bash,#!/bin/sh,' \
500         check_smb.sh
501 mv check_appletalk.{pl,orig}
502 sed -ne '/---/!p;/---/q' < check_appletalk.orig > check_appletalk.pl
503
504 chmod a+x check_*.{pl,sh,py}
505 chmod a+x check_{fan_{cpq,fsc}_present,frontpage,oracle_tbs,pfstate,temp_{cpq,fsc}}
506
507 # exists in main
508 rm check_{breeze,wave}.pl
509 rm check_flexlm.pl
510
511 # more appropriate name
512 mv check_nagios{,_mysql}.pl
513
514 sed -i -e "
515         s,use lib '.*/nagios/libexec/?',use lib '%{_pluginlibdir}',
516         s,use lib \".*/nagios/libexec/?\",use lib '%{_pluginlibdir}',
517         s,require '/usr/libexec/nagios/plugins,require '%{_pluginlibdir},
518         s,use lib utils.pm,use lib '%{_pluginlibdir}', # subst not applied to contrib/ dir
519         s,/usr/libexec/nagios/plugins,%{_pluginlibdir},
520         s,/usr/local/nagios/libexec,%{_pluginlibdir},
521         s,/opt/nagios/libexec,%{_pluginlibdir},
522         s,/some/path/libexec,%{_pluginlibdir},
523         s,/usr/local/libexec/nagios,%{_pluginlibdir},
524         s,/usr/local/netsaint/libexec,%{_pluginlibdir},
525         s,/usr/local/libexec,%{_pluginlibdir},
526 " check_* *.pl
527
528 %build
529 %{__gettextize}
530 %{__libtoolize}
531 %{__aclocal} -I m4 -I gl/m4
532 %{__autoconf}
533 %{__autoheader}
534 %{__automake}
535
536 %configure \
537         --libexecdir=%{_pluginarchdir} \
538         --with-cgiurl=/nagios/cgi-bin \
539         --with-mysql=/usr \
540         --with-pgsql=/usr \
541         --with-openssl=/usr \
542         --with-ping-command='/bin/ping -n -U -w %%d -c %%d %%s' \
543         --with-ping6-command='/bin/ping6 -n -U -w %%d -c %%d %%s' \
544         --with-ps-command="/bin/ps axwo 'stat uid ppid vsz rss pcpu comm args'" \
545         --with-ps-format="%%s %%d %%d %%d %%d %%f %%s %%n" \
546         --with-ps-cols=8 \
547         --with-ps-varlist="procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos" \
548         --with-proc-meminfo=/proc/meminfo \
549         --with-proc-loadavg=/proc/loadavg \
550         --with-nslookup-command="/usr/bin/nslookup -sil" \
551         --with-uptime-command=/usr/bin/uptime \
552         --with-rpcinfo-command=/usr/sbin/rpcinfo \
553         --with-ntpdate-command=/usr/sbin/ntpdate \
554         --with-smbclient-command=/usr/bin/smbclient \
555         --with-dig-command=/usr/bin/dig \
556         --with-fping-command=/usr/sbin/fping \
557         --with-qstat-command=/usr/bin/qstat \
558         --with-ssh-command=/usr/bin/ssh \
559         --with-snmpget-command=/usr/bin/snmpget \
560         --with-snmpgetnext-command=/usr/bin/snmpgetnext \
561         --with-df-command='/bin/df -P' \
562         --with-apt-get-command=/usr/bin/apt-get \
563         --with-qmail-qstat-command=/usr/bin/qmail-qstat \
564         --with-mailq-command=/usr/bin/mailq \
565         --without-included-regex
566
567 %{__make}
568
569 # contrib. mostly useless. but you'll never know
570 cd contrib
571
572 %{__cc} %{rpmcflags} check_cluster2.c -o check_cluster2
573
574 %{__cc} %{rpmcflags} -I../plugins -I.. -I../gl -I../lib -c check_rbl.c
575 %{__cc} %{rpmcflags} check_rbl.o -o check_rbl ../plugins/popen.o ../plugins/utils.o ../plugins/netutils.o ../lib/utils_base.o
576
577 %{__cc} %{rpmcflags} check_timeout.c -o check_timeout
578
579 %{__cc} %{rpmcflags} -I../plugins -I.. -I../gl -I../lib -c check_uptime.c
580 %{__cc} %{rpmcflags} check_uptime.o -o check_uptime ../plugins/popen.o ../plugins/utils.o ../lib/utils_base.o
581
582 %install
583 rm -rf $RPM_BUILD_ROOT
584
585 %{__make} install \
586         DESTDIR=$RPM_BUILD_ROOT
587
588 %{__make} install-root -C plugins-root \
589         DESTDIR=$RPM_BUILD_ROOT
590
591 # for nagios-plugin-check_mysql_perf (at least)
592 cp -a lib/libnagiosplug.a $RPM_BUILD_ROOT%{_libdir}
593 cp -a gl/libgnu.a $RPM_BUILD_ROOT%{_libdir}
594 cp -a plugins/utils.o $RPM_BUILD_ROOT%{_libdir}
595 cp -a plugins/netutils.o $RPM_BUILD_ROOT%{_libdir}
596 install -d $RPM_BUILD_ROOT%{_includedir}/nagiosplug/{plugins,gl,lib}
597 cp -a *.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug
598 cp -a plugins/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/plugins
599 cp -a gl/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/gl
600 cp -a lib/*.h $RPM_BUILD_ROOT%{_includedir}/nagiosplug/lib
601
602 install -d $RPM_BUILD_ROOT%{_sysconfdir}
603 cp -a commands/*.cfg $RPM_BUILD_ROOT%{_sysconfdir}
604
605 %find_lang %{name}
606
607 # all files with exec permissions are plugins.
608 install -d $RPM_BUILD_ROOT%{_pluginarchdir}
609 find contrib -name 'check_*' -type f -perm +1 | while read a; do
610         s=$RPM_BUILD_ROOT%{_pluginarchdir}/${a##*/}
611         # strip without extensions, if eventually merged to main wouldn't need to rename plugins
612         s=${s%.pl}
613         s=${s%.sh}
614         if [ -f $s ]; then
615                 # we don't want file from contrib overwrite one from main
616                 : Duplicate file from contrib: $s
617                 exit 1
618         fi
619         install $a $s
620 done
621
622 %if "%{_pluginarchdir}" != "%{_pluginlibdir}"
623 # move arch independat files to _pluginlibdir
624 install -d $RPM_BUILD_ROOT%{_pluginlibdir}
625 mv $(find $RPM_BUILD_ROOT%{_pluginarchdir} -type f | xargs file | awk -F: '!/ELF/{print $1}') $RPM_BUILD_ROOT%{_pluginlibdir}
626 %{__sed} -i -e 's,use lib "%{_pluginarchdir}",use lib "%{_pluginlibdir}",' $RPM_BUILD_ROOT%{_pluginlibdir}/check_*
627 %endif
628
629 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_pluginlibdir}/utils.php
630 cp -a contrib/utils.py $RPM_BUILD_ROOT%{_pluginlibdir}
631 chmod a-x $RPM_BUILD_ROOT%{_pluginlibdir}/utils.*
632
633 rm -f $RPM_BUILD_ROOT%{_libdir}/libnagiosplug.la
634
635 %clean
636 rm -rf $RPM_BUILD_ROOT
637
638 %post   libs    -p /sbin/ldconfig
639 %postun libs    -p /sbin/ldconfig
640
641 %triggerun -- %{name} < 1.4-0.35
642 %banner -e %{name} <<EOF
643 Several Nagios plugins have been separated to multiple packages to cut
644 down unneccessary deps on main package.
645
646 Please install %{name}-PACKAGE if you need these plugins.
647 To revert to previous state just run:
648 poldek -u nagios-plugins-{snmp,samba,sensors,mysql,pgsql,radius,qstat,ldap,ntp,dns,ssh,procps,fping}
649
650 EOF
651
652 %files -f %{name}.lang
653 %defattr(644,root,root,755)
654 %doc ACKNOWLEDGEMENTS AUTHORS BUGS CODING ChangeLog
655 %doc FAQ LEGAL NEWS README REQUIREMENTS SUPPORT THANKS
656
657 %defattr(755,root,root,755)
658 # plugins
659 %attr(755,root,root) %{_pluginarchdir}/check_apt
660 %attr(755,root,root) %{_pluginarchdir}/check_cluster
661 %attr(755,root,root) %{_pluginarchdir}/check_cluster2
662 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_disk.cfg
663 %attr(755,root,root) %{_pluginarchdir}/check_disk
664 %attr(755,root,root) %{_pluginarchdir}/check_dummy
665 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_http.cfg
666 %attr(755,root,root) %{_pluginarchdir}/check_http
667 %attr(755,root,root) %{_pluginarchdir}/check_ide_smart
668 %attr(755,root,root) %{_pluginarchdir}/check_mrtg
669 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_mrtgtraf.cfg
670 %attr(755,root,root) %{_pluginarchdir}/check_mrtgtraf
671 %attr(755,root,root) %{_pluginarchdir}/check_nagios
672 # req: over-cr >= 0.99.53 http://www.molitor.org/overcr
673 %attr(755,root,root) %{_pluginarchdir}/check_overcr
674 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_procs.cfg
675 %attr(755,root,root) %{_pluginarchdir}/check_procs
676 %attr(755,root,root) %{_pluginarchdir}/check_real
677 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_smtp.cfg
678 %attr(755,root,root) %{_pluginarchdir}/check_smtp
679 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ssh.cfg
680 %attr(755,root,root) %{_pluginarchdir}/check_ssh
681 %attr(755,root,root) %{_pluginarchdir}/check_time
682 %attr(755,root,root) %{_pluginarchdir}/check_ups
683 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_users.cfg
684 %attr(755,root,root) %{_pluginarchdir}/check_users
685 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_swap.cfg
686 %attr(755,root,root) %{_pluginarchdir}/check_swap
687 %attr(755,root,root) %{_pluginlibdir}/check_log
688
689 # check_tcp and symlinks
690 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_tcp.cfg
691 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_telnet.cfg
692 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_spamd.cfg
693 %attr(755,root,root) %{_pluginarchdir}/check_tcp
694 %attr(755,root,root) %{_pluginarchdir}/check_clamd
695 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ftp.cfg
696 %attr(755,root,root) %{_pluginarchdir}/check_ftp
697 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_imap.cfg
698 %attr(755,root,root) %{_pluginarchdir}/check_imap
699 %attr(755,root,root) %{_pluginarchdir}/check_jabber
700 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_nntp.cfg
701 %attr(755,root,root) %{_pluginarchdir}/check_nntp
702 %attr(755,root,root) %{_pluginarchdir}/check_nntps
703 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_pop.cfg
704 %attr(755,root,root) %{_pluginarchdir}/check_pop
705 %attr(755,root,root) %{_pluginarchdir}/check_simap
706 %attr(755,root,root) %{_pluginarchdir}/check_spop
707 %attr(755,root,root) %{_pluginarchdir}/check_ssmtp
708 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_udp.cfg
709 %attr(755,root,root) %{_pluginarchdir}/check_udp
710
711 # these plugins need suid bit to operate
712 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_dhcp.cfg
713 %attr(755,root,root) %{_pluginarchdir}/check_dhcp
714 %attr(755,root,root) %{_pluginarchdir}/check_icmp
715
716 # Cannot determine ORACLE_HOME for sid
717 # probably needs some external programs. can't test
718 %attr(755,root,root) %{_pluginlibdir}/check_oracle
719
720 %files libs
721 %defattr(644,root,root,755)
722 #%attr(755,root,root) %{_libdir}/libnagiosplug.so.0.0.0
723 %attr(755,root,root) %{_pluginarchdir}/negate
724 %attr(755,root,root) %{_pluginarchdir}/urlize
725
726 %{_pluginlibdir}/utils.pm
727 %{_pluginlibdir}/utils.php
728 %{_pluginlibdir}/utils.sh
729 %{_pluginlibdir}/utils.py
730
731 %files devel
732 %defattr(644,root,root,755)
733 %{_libdir}/libgnu.a
734 %{_libdir}/libnagiosplug.a
735 %{_libdir}/netutils.o
736 %{_libdir}/utils.o
737 %{_includedir}/nagiosplug
738
739 %files perl
740 %defattr(644,root,root,755)
741 %attr(755,root,root) %{_pluginlibdir}/check_file_age
742 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ircd.cfg
743 %attr(755,root,root) %{_pluginlibdir}/check_ircd
744 %attr(755,root,root) %{_pluginlibdir}/check_mailq
745 %attr(755,root,root) %{_pluginlibdir}/check_rpc
746
747 # requires license.dat
748 %attr(755,root,root) %{_pluginlibdir}/check_flexlm
749
750 # Not to be confused with nagios-snmp-plugins
751 %files snmp
752 %defattr(644,root,root,755)
753 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_snmp.cfg
754 %attr(755,root,root) %{_pluginarchdir}/check_snmp
755 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_hpjd.cfg
756 %attr(755,root,root) %{_pluginarchdir}/check_hpjd
757 %attr(755,root,root) %{_pluginlibdir}/check_ifoperstatus
758 %attr(755,root,root) %{_pluginlibdir}/check_ifstatus
759 %attr(755,root,root) %{_pluginlibdir}/check_wave
760 %attr(755,root,root) %{_pluginlibdir}/check_breeze
761
762 %files samba
763 %defattr(644,root,root,755)
764 %attr(755,root,root) %{_pluginlibdir}/check_disk_smb
765
766 %files -n nagios-plugin-check_sensors
767 %defattr(644,root,root,755)
768 %attr(755,root,root) %{_pluginlibdir}/check_sensors
769
770 %files mysql
771 %defattr(644,root,root,755)
772 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_mysql.cfg
773 %attr(755,root,root) %{_pluginarchdir}/check_mysql
774 %attr(755,root,root) %{_pluginarchdir}/check_mysql_query
775
776 %files -n nagios-plugin-check_pgsql
777 %defattr(644,root,root,755)
778 %attr(755,root,root) %{_pluginarchdir}/check_pgsql
779
780 %files -n nagios-plugin-check_radius
781 %defattr(644,root,root,755)
782 %attr(755,root,root) %{_pluginarchdir}/check_radius
783
784 %files -n nagios-plugin-check_game
785 %defattr(644,root,root,755)
786 %attr(755,root,root) %{_pluginarchdir}/check_game
787
788 %files -n nagios-plugin-check_ldap
789 %defattr(644,root,root,755)
790 %attr(755,root,root) %{_pluginarchdir}/check_ldap
791 %attr(755,root,root) %{_pluginarchdir}/check_ldaps
792
793 %files -n nagios-plugin-check_ntp
794 %defattr(644,root,root,755)
795 %attr(755,root,root) %{_pluginarchdir}/check_ntp
796 %attr(755,root,root) %{_pluginarchdir}/check_ntp_peer
797 %attr(755,root,root) %{_pluginarchdir}/check_ntp_time
798
799 %files -n nagios-plugin-check_dns
800 %defattr(644,root,root,755)
801 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_dns.cfg
802 %attr(755,root,root) %{_pluginarchdir}/check_dns
803
804 %files -n nagios-plugin-check_dig
805 %defattr(644,root,root,755)
806 %attr(755,root,root) %{_pluginarchdir}/check_dig
807
808 %files ssh
809 %defattr(644,root,root,755)
810 %attr(755,root,root) %{_pluginarchdir}/check_by_ssh
811
812 %files -n nagios-plugin-check_load
813 %defattr(644,root,root,755)
814 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_load.cfg
815 %attr(755,root,root) %{_pluginarchdir}/check_load
816
817 %files -n nagios-plugin-check_ping
818 %defattr(644,root,root,755)
819 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_ping.cfg
820 %attr(2755,root,adm) %{_pluginarchdir}/check_ping
821
822 %files -n nagios-plugin-check_fping
823 %defattr(644,root,root,755)
824 %attr(2755,root,adm) %{_pluginarchdir}/check_fping
825
826 %files contrib
827 %defattr(644,root,root,755)
828 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/check_nt.cfg
829 %attr(755,root,root) %{_pluginarchdir}/check_nt
830 %attr(755,root,root) %{_pluginarchdir}/check_nwstat
831 %attr(755,root,root) %{_pluginarchdir}/check_rbl
832 %attr(755,root,root) %{_pluginarchdir}/check_timeout
833 %attr(755,root,root) %{_pluginarchdir}/check_uptime
834
835 %attr(755,root,root) %{_pluginlibdir}/check_adptraid
836 %attr(755,root,root) %{_pluginlibdir}/check_apache
837 %attr(755,root,root) %{_pluginlibdir}/check_apc_ups
838 %attr(755,root,root) %{_pluginlibdir}/check_appletalk
839 %attr(755,root,root) %{_pluginlibdir}/check_arping
840 %attr(755,root,root) %{_pluginlibdir}/check_asterisk
841 %attr(755,root,root) %{_pluginlibdir}/check_axis
842 %attr(755,root,root) %{_pluginlibdir}/check_backup
843 %attr(755,root,root) %{_pluginlibdir}/check_bgpstate
844 %attr(755,root,root) %{_pluginlibdir}/check_compaq_insight
845 %attr(755,root,root) %{_pluginlibdir}/check_digitemp
846 %attr(755,root,root) %{_pluginlibdir}/check_dlswcircuit
847 %attr(755,root,root) %{_pluginlibdir}/check_dns_random
848 %attr(755,root,root) %{_pluginlibdir}/check_email_loop
849 %attr(755,root,root) %{_pluginlibdir}/check_fan_cpq_present
850 %attr(755,root,root) %{_pluginlibdir}/check_fan_fsc_present
851 %attr(755,root,root) %{_pluginlibdir}/check_flexlm
852 %attr(755,root,root) %{_pluginlibdir}/check_frontpage
853 %attr(755,root,root) %{_pluginlibdir}/check_hprsc
854 %attr(755,root,root) %{_pluginlibdir}/check_hw
855 %attr(755,root,root) %{_pluginlibdir}/check_ica_master_browser
856 %attr(755,root,root) %{_pluginlibdir}/check_ica_metaframe_pub_apps
857 %attr(755,root,root) %{_pluginlibdir}/check_ica_program_neigbourhood
858 %attr(755,root,root) %{_pluginlibdir}/check_inodes-freebsd
859 %attr(755,root,root) %{_pluginlibdir}/check_inodes
860 %attr(755,root,root) %{_pluginlibdir}/check_javaproc
861 %attr(755,root,root) %{_pluginlibdir}/check_joy
862 %attr(755,root,root) %{_pluginlibdir}/check_linux_raid
863 %attr(755,root,root) %{_pluginlibdir}/check_lmmon
864 %attr(755,root,root) %{_pluginlibdir}/check_log2
865 %attr(755,root,root) %{_pluginlibdir}/check_lotus
866 %attr(755,root,root) %{_pluginlibdir}/check_maxchannels
867 %attr(755,root,root) %{_pluginlibdir}/check_maxwanstate
868 %attr(755,root,root) %{_pluginlibdir}/check_mem
869 %attr(755,root,root) %{_pluginlibdir}/check_ms_spooler
870 %attr(755,root,root) %{_pluginlibdir}/check_mssql
871 %attr(755,root,root) %{_pluginlibdir}/check_nagios_db
872 %attr(755,root,root) %{_pluginlibdir}/check_nagios_db_pg
873 %attr(755,root,root) %{_pluginlibdir}/check_nagios_mysql
874 %attr(755,root,root) %{_pluginlibdir}/check_netapp
875 %attr(755,root,root) %{_pluginlibdir}/check_nmap.py
876 %attr(755,root,root) %{_pluginlibdir}/check_ora_table_space
877 %attr(755,root,root) %{_pluginlibdir}/check_oracle_instance
878 %attr(755,root,root) %{_pluginlibdir}/check_oracle_tbs
879 %attr(755,root,root) %{_pluginlibdir}/check_pcpmetric.py
880 %attr(755,root,root) %{_pluginlibdir}/check_pfstate
881 %attr(755,root,root) %{_pluginlibdir}/check_qmailq
882 %attr(755,root,root) %{_pluginlibdir}/check_remote_nagios_status
883 %attr(755,root,root) %{_pluginlibdir}/check_rrd_data
884 %attr(755,root,root) %{_pluginlibdir}/check_sap
885 %attr(755,root,root) %{_pluginlibdir}/check_smart
886 %attr(755,root,root) %{_pluginlibdir}/check_smb
887 %attr(755,root,root) %{_pluginlibdir}/check_snmp_disk_monitor
888 %attr(755,root,root) %{_pluginlibdir}/check_snmp_printer
889 %attr(755,root,root) %{_pluginlibdir}/check_snmp_process_monitor
890 %attr(755,root,root) %{_pluginlibdir}/check_snmp_procs
891 %attr(755,root,root) %{_pluginlibdir}/check_sockets
892 %attr(755,root,root) %{_pluginlibdir}/check_temp_cpq
893 %attr(755,root,root) %{_pluginlibdir}/check_temp_fsc
894 %attr(755,root,root) %{_pluginlibdir}/check_traceroute-pure_perl
895 %attr(755,root,root) %{_pluginlibdir}/check_traceroute
896 %attr(755,root,root) %{_pluginlibdir}/check_vcs
897 %attr(755,root,root) %{_pluginlibdir}/check_wins
This page took 0.09863 seconds and 3 git commands to generate.