Merge pull request #2035 from RincewindsHat/cleanup/rest-of-plugins
[monitoring-plugins.git] / .github / monitoring-plugins.spec
blob5cae3e5962bd93c47a83a6b363b63e817d9f9646
1 %global upstream_name monitoring-plugins
2 %global version 2.3.3
3 %global plugindir %{_libdir}/monitoring/plugins
4 %global commit 72dd0a308130b9778828d143d1b9d9906218d6ac
5 %global shortcommit %(c=%{commit}; echo ${c:0:7})
6 %global fromgit 0
8 %define _unpackaged_files_terminate_build 0
10 Name: %{upstream_name}
11 Version: %{version}
12 Summary: Monitoring Plugins from the Monitoring Plugins Team
14 License: GPLv3
15 URL: https://www.monitoring-plugins.org
16 ## When using checkouts from git, use the following
17 %if 0%{?fromgit}
18 Release: git.%{?shortcommit}.1%{?dist}
19 Source0: https://github.com/monitoring-plugins/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
20 %else
21 Release: 1%{?dist}
22 Source0: https://www.monitoring-plugins.org/download/monitoring-plugins-%{version}.tar.gz
23 %endif
24 Conflicts: nagios-plugins
29 ##### BUILD REQUIREMENTS #####
30 # Needed for the git code
31 %if 0%{?fromgit}
32 BuildRequires: automake
33 BuildRequires: autoconf
34 BuildRequires: gettext-devel
35 %endif
36 ### General build requirements
37 BuildRequires: gcc
38 BuildRequires: make
39 BuildRequires: automake
41 ### Check Plugin specific build requirements
42 # check_by_ssh
43 BuildRequires: openssh-clients
45 # check_curl
46 BuildRequires: libcurl-devel >= 7.15.2
47 BuildRequires: openssl-devel
48 BuildRequires: uriparser-devel >= 0.7.5
50 # check_dbi
51 %if 0%{?rhel} != 9
52 BuildRequires: libdbi-devel
53 %endif
55 # check_dig check_dns
56 BuildRequires: bind-utils
58 # check_disk_smb
59 %if 0%{?rhel} == 7
60 BuildRequires: samba-client
61 %endif
63 # check_fping
64 BuildRequires: fping
66 # check_game
67 %if 0%{?rhel} != 8
68 BuildRequires: qstat
69 %endif
71 # check_hpjd
72 BuildRequires: net-snmp-utils
74 # check_ldap check_ldaps
75 BuildRequires: openldap-devel
77 # check_load
78 BuildRequires: procps-ng
80 # check_mysql check_mysql_query
81 %if 0%{?rhel} == 7
82 BuildRequires: mariadb-devel
83 %endif
85 # check_pgsql
86 BuildRequires: postgresql-devel
88 # check_radius
89 BuildRequires: radcli-devel
91 %description
92 Common files for Monitoring Plugins
94 %files
95 %{plugindir}/negate
96 %{plugindir}/urlize
97 %{plugindir}/utils.pm
98 %{plugindir}/utils.sh
99 %doc ABOUT-NLS
100 %doc ACKNOWLEDGEMENTS
101 %doc AUTHORS
102 %doc CODING
103 %doc FAQ
104 %doc NEWS
105 %doc README
106 %doc REQUIREMENTS
107 %doc SUPPORT
108 %license COPYING
113 ##### ACTUAL BUILD #####
114 %prep
115 %if 0%{?fromgit}
116 %autosetup -n %{upstream_name}-%{commit}
117 %else
118 %autosetup -n %{upstream_name}-%{version}
119 %endif
122 %build
123 %if 0%{?fromgit}
124 ./tools/setup
125 %endif
126 %configure \
127 --prefix=%{_prefix} \
128 --libexecdir=%{plugindir} \
129 --with-openssl=/usr \
130 --with-ping-command="/usr/bin/ping -4 -n -U -w %d -c %d %s" \
131 --with-ping6-command="/usr/bin/ping -6 -n -U -w %d -c %d %s"
132 %make_build
134 %if 0%{?fromgit}
135 make THANKS
136 %endif
138 %install
139 %make_install
140 %{__make} install-root DESTDIR=%{buildroot} INSTALL="%{__install} -p"
145 ##### SUB PACKAGES #####
146 # all
147 %package all
148 Summary: Monitoring Plugins - All Check Plugins
149 Requires: %{name}
150 Requires: %{name}-apt
151 Requires: %{name}-breeze
152 Requires: %{name}-by_ssh
153 Requires: %{name}-cluster
154 Requires: %{name}-curl
155 %if 0%{?rhel} != 9
156 Requires: %{name}-dbi
157 %endif
158 Requires: %{name}-dhcp
159 Requires: %{name}-dig
160 Requires: %{name}-disk
161 %if 0%{?rhel} == 7
162 Requires: %{name}-disk_smb
163 %endif
164 Requires: %{name}-dns
165 Requires: %{name}-dummy
166 Requires: %{name}-file_age
167 Requires: %{name}-flexlm
168 Requires: %{name}-fping
169 %if 0%{?rhel} != 8
170 Requires: %{name}-game
171 %endif
172 Requires: %{name}-hpjd
173 Requires: %{name}-http
174 Requires: %{name}-icmp
175 Requires: %{name}-ide_smart
176 Requires: %{name}-ifoperstatus
177 Requires: %{name}-ifstatus
178 Requires: %{name}-ircd
179 Requires: %{name}-ldap
180 Requires: %{name}-load
181 Requires: %{name}-log
182 Requires: %{name}-mailq
183 Requires: %{name}-mrtg
184 Requires: %{name}-mrtgtraf
185 %if 0%{?rhel} == 7
186 Requires: %{name}-mysql
187 Requires: %{name}-mysql_query
188 %endif
189 Requires: %{name}-nagios
190 Requires: %{name}-nt
191 Requires: %{name}-ntp
192 Requires: %{name}-ntp_peer
193 Requires: %{name}-ntp_time
194 Requires: %{name}-nwstat
195 Requires: %{name}-oracle
196 Requires: %{name}-overcr
197 Requires: %{name}-pgsql
198 Requires: %{name}-ping
199 Requires: %{name}-procs
200 Requires: %{name}-radius
201 Requires: %{name}-real
202 Requires: %{name}-rpc
203 Requires: %{name}-sensors
204 Requires: %{name}-smtp
205 Requires: %{name}-snmp
206 Requires: %{name}-ssh
207 Requires: %{name}-swap
208 Requires: %{name}-tcp
209 Requires: %{name}-time
210 Requires: %{name}-ups
211 Requires: %{name}-uptime
212 Requires: %{name}-users
213 Requires: %{name}-wave
215 %description all
216 Meta package that requires all the check plugins of the Monitoring Plugins
218 %files all
222 # check_apt
223 %package apt
224 Summary: Monitoring Plugins - check_apt
225 Requires: %{name} = %{version}-%{release}
227 %description apt
228 Provides check_apt of the Monitoring Plugins.
230 %files apt
231 %{plugindir}/check_apt
235 # check_breeze
236 %package breeze
237 Summary: Monitoring Plugins - check_breeze
238 Requires: %{name} = %{version}-%{release}
240 %description breeze
241 Provides check_breeze of the Monitoring Plugins.
243 %files breeze
244 %{plugindir}/check_breeze
248 # check_by_ssh
249 %package by_ssh
250 Summary: Monitoring Plugins - check_by_ssh
251 Requires: %{name} = %{version}-%{release}
253 %description by_ssh
254 Provides check_by_ssh of the Monitoring Plugins.
256 %files by_ssh
257 %{plugindir}/check_by_ssh
261 # check_cluster
262 %package cluster
263 Summary: Monitoring Plugins - check_cluster
264 Requires: %{name} = %{version}-%{release}
266 %description cluster
267 Provides check_cluster of the Monitoring Plugins.
269 %files cluster
270 %{plugindir}/check_cluster
274 # check_curl
275 %package curl
276 Summary: Monitoring Plugins - check_curl
277 Requires: %{name} = %{version}-%{release}
279 %description curl
280 Provides check_curl of the Monitoring Plugins.
282 %files curl
283 %{plugindir}/check_curl
287 # check_dbi
288 %if 0%{?rhel} != 9
289 %package dbi
290 Summary: Monitoring Plugins - check_dbi
291 Requires: %{name} = %{version}-%{release}
293 %description dbi
294 Provides check_dbi of the Monitoring Plugins.
296 %files dbi
297 %{plugindir}/check_dbi
298 %endif
302 # check_dhcp
303 %package dhcp
304 Summary: Monitoring Plugins - check_dhcp
305 Requires: %{name} = %{version}-%{release}
307 %description dhcp
308 Provides check_dhcp of the Monitoring Plugins.
310 %files dhcp
311 %{plugindir}/check_dhcp
315 # check_dig
316 %package dig
317 Summary: Monitoring Plugins - check_dig
318 Requires: %{name} = %{version}-%{release}
319 Requires: bind-utils
321 %description dig
322 Provides check_dig of the Monitoring Plugins.
324 %files dig
325 %{plugindir}/check_dig
329 # check_disk
330 %package disk
331 Summary: Monitoring Plugins - check_disk
332 Requires: %{name} = %{version}-%{release}
334 %description disk
335 Provides check_disk of the Monitoring Plugins.
337 %files disk
338 %{plugindir}/check_disk
342 # check_disk_smb
343 %if 0%{?rhel} == 7
344 %package disk_smb
345 Summary: Monitoring Plugins - check_disk_smb
346 Requires: %{name} = %{version}-%{release}
347 Requires: samba-client
349 %description disk_smb
350 Provides check_disk_smb of the Monitoring Plugins.
352 %files disk_smb
353 %{plugindir}/check_disk_smb
354 %endif
358 # check_dns
359 %package dns
360 Summary: Monitoring Plugins - check_dns
361 Requires: %{name} = %{version}-%{release}
362 Requires: bind-utils
364 %description dns
365 Provides check_dns of the Monitoring Plugins.
367 %files dns
368 %{plugindir}/check_dns
372 # check_dummy
373 %package dummy
374 Summary: Monitoring Plugins - check_dummy
375 Requires: %{name} = %{version}-%{release}
377 %description dummy
378 Provides check_dummy of the Monitoring Plugins.
380 %files dummy
381 %{plugindir}/check_dummy
385 # check_file_age
386 %package file_age
387 Summary: Monitoring Plugins - check_file_age
388 Requires: %{name} = %{version}-%{release}
390 %description file_age
391 Provides check_file_age of the Monitoring Plugins.
393 %files file_age
394 %{plugindir}/check_file_age
398 # check_flexlm
399 %package flexlm
400 Summary: Monitoring Plugins - check_flexlm
401 Requires: %{name} = %{version}-%{release}
403 %description flexlm
404 Provides check_flexlm of the Monitoring Plugins.
406 %files flexlm
407 %{plugindir}/check_flexlm
411 # check_fping
412 %package fping
413 Summary: Monitoring Plugins - check_fping
414 Requires: %{name} = %{version}-%{release}
415 Requires: fping
417 %description fping
418 Provides check_fping of the Monitoring Plugins.
420 %files fping
421 %{plugindir}/check_fping
425 # check_game
426 %if 0%{?rhel} != 8
427 %package game
428 Summary: Monitoring Plugins - check_fping
429 Requires: %{name} = %{version}-%{release}
430 Requires: qstat
432 %description game
433 Provides check_game of the Monitoring Plugins.
435 %files game
436 %{plugindir}/check_game
437 %endif
441 # check_hpjd
442 %package hpjd
443 Summary: Monitoring Plugins - check_hpjd
444 Requires: %{name} = %{version}-%{release}
446 %description hpjd
447 Provides check_hpjd of the Monitoring Plugins.
449 %files hpjd
450 %{plugindir}/check_hpjd
454 # check_http
455 %package http
456 Summary: Monitoring Plugins - check_http
457 Requires: %{name} = %{version}-%{release}
459 %description http
460 Provides check_http of the Monitoring Plugins.
462 %files http
463 %{plugindir}/check_http
467 # check_icmp
468 %package icmp
469 Summary: Monitoring Plugins - check_icmp
470 Requires: %{name} = %{version}-%{release}
472 %description icmp
473 Provides check_icmp of the Monitoring Plugins.
475 %files icmp
476 %{plugindir}/check_icmp
480 # check_ide_smart
481 %package ide_smart
482 Summary: Monitoring Plugins - check_ide_smart
483 Requires: %{name} = %{version}-%{release}
485 %description ide_smart
486 Provides check_ide_smart of the Monitoring Plugins.
488 %files ide_smart
489 %{plugindir}/check_ide_smart
493 # check_ifoperstatus
494 %package ifoperstatus
495 Summary: Monitoring Plugins - check_ifoperstatus
496 Requires: %{name} = %{version}-%{release}
497 Requires: perl(Net::SNMP)
499 %description ifoperstatus
500 Provides check_ifoperstatus of the Monitoring Plugins.
502 %files ifoperstatus
503 %{plugindir}/check_ifoperstatus
507 # check_ifstatus
508 %package ifstatus
509 Summary: Monitoring Plugins - check_ifstatus
510 Requires: %{name} = %{version}-%{release}
512 %description ifstatus
513 Provides check_ifstatus of the Monitoring Plugins.
515 %files ifstatus
516 %{plugindir}/check_ifstatus
520 # check_ircd
521 %package ircd
522 Summary: Monitoring Plugins - check_ircd
523 Requires: %{name} = %{version}-%{release}
525 %description ircd
526 Provides check_ircd of the Monitoring Plugins.
528 %files ircd
529 %{plugindir}/check_ircd
533 # check_ldap
534 %package ldap
535 Summary: Monitoring Plugins - check_ldap
536 Requires: %{name} = %{version}-%{release}
538 %description ldap
539 Provides check_ldap of the Monitoring Plugins.
541 %files ldap
542 %{plugindir}/check_ldap
543 %{plugindir}/check_ldaps
547 # check_load
548 %package load
549 Summary: Monitoring Plugins - check_load
550 Requires: %{name} = %{version}-%{release}
551 Requires: procps-ng
553 %description load
554 Provides check_load of the Monitoring Plugins.
556 %files load
557 %{plugindir}/check_load
561 # check_log
562 %package log
563 Summary: Monitoring Plugins - check_log
564 Requires: %{name} = %{version}-%{release}
566 %description log
567 Provides check_log of the Monitoring Plugins.
569 %files log
570 %{plugindir}/check_log
574 # check_mailq
575 %package mailq
576 Summary: Monitoring Plugins - check_mailq
577 Requires: %{name} = %{version}-%{release}
579 %description mailq
580 Provides check_mailq of the Monitoring Plugins.
582 %files mailq
583 %{plugindir}/check_mailq
587 # check_mrtg
588 %package mrtg
589 Summary: Monitoring Plugins - check_mrtg
590 Requires: %{name} = %{version}-%{release}
592 %description mrtg
593 Provides check_mrtg of the Monitoring Plugins.
595 %files mrtg
596 %{plugindir}/check_mrtg
600 # check_mrtgtraf
601 %package mrtgtraf
602 Summary: Monitoring Plugins - check_mrtgtraf
603 Requires: %{name} = %{version}-%{release}
605 %description mrtgtraf
606 Provides check_mrtgtraf of the Monitoring Plugins.
608 %files mrtgtraf
609 %{plugindir}/check_mrtgtraf
613 %if 0%{?rhel} == 7
614 # check_mysql
615 %package mysql
616 Summary: Monitoring Plugins - check_mysql
617 Requires: %{name} = %{version}-%{release}
619 %description mysql
620 Provides check_mysql of the Monitoring Plugins.
622 %files mysql
623 %{plugindir}/check_mysql
627 # check_mysql_query
628 %package mysql_query
629 Summary: Monitoring Plugins - check_mysql_query
630 Requires: %{name} = %{version}-%{release}
632 %description mysql_query
633 Provides check_mysql_query of the Monitoring Plugins.
635 %files mysql_query
636 %{plugindir}/check_mysql_query
637 %endif
641 # check_nagios
642 %package nagios
643 Summary: Monitoring Plugins - check_nagios
644 Requires: %{name} = %{version}-%{release}
646 %description nagios
647 Provides check_nagios of the Monitoring Plugins.
649 %files nagios
650 %{plugindir}/check_nagios
654 # check_nt
655 %package nt
656 Summary: Monitoring Plugins - check_nt
657 Requires: %{name} = %{version}-%{release}
659 %description nt
660 Provides check_nt of the Monitoring Plugins.
662 %files nt
663 %{plugindir}/check_nt
667 # check_ntp
668 %package ntp
669 Summary: Monitoring Plugins - check_ntp
670 Requires: %{name} = %{version}-%{release}
672 %description ntp
673 Provides check_ntp of the Monitoring Plugins.
675 %files ntp
676 %{plugindir}/check_ntp
680 # check_ntp_peer
681 %package ntp_peer
682 Summary: Monitoring Plugins - check_ntp_peer
683 Requires: %{name} = %{version}-%{release}
685 %description ntp_peer
686 Provides check_ntp_peer of the Monitoring Plugins.
688 %files ntp_peer
689 %{plugindir}/check_ntp_peer
693 # check_ntp_time
694 %package ntp_time
695 Summary: Monitoring Plugins - check_ntp_time
696 Requires: %{name} = %{version}-%{release}
698 %description ntp_time
699 Provides check_ntp_time of the Monitoring Plugins.
701 %files ntp_time
702 %{plugindir}/check_ntp_time
706 # check_nwstat
707 %package nwstat
708 Summary: Monitoring Plugins - check_nwstat
709 Requires: %{name} = %{version}-%{release}
711 %description nwstat
712 Provides check_nwstat of the Monitoring Plugins.
714 %files nwstat
715 %{plugindir}/check_nwstat
719 # check_oracle
720 %package oracle
721 Summary: Monitoring Plugins - check_oracle
722 Requires: %{name} = %{version}-%{release}
724 %description oracle
725 Provides check_oracle of the Monitoring Plugins.
727 %files oracle
728 %{plugindir}/check_oracle
732 # check_overcr
733 %package overcr
734 Summary: Monitoring Plugins - check_overcr
735 Requires: %{name} = %{version}-%{release}
737 %description overcr
738 Provides check_overcr of the Monitoring Plugins.
740 %files overcr
741 %{plugindir}/check_overcr
745 # check_pgsql
746 %package pgsql
747 Summary: Monitoring Plugins - check_pgsql
748 Requires: %{name} = %{version}-%{release}
750 %description pgsql
751 Provides check_pgsql of the Monitoring Plugins.
753 %files pgsql
754 %{plugindir}/check_pgsql
758 # check_ping
759 %package ping
760 Summary: Monitoring Plugins - check_ping
761 Requires: %{name} = %{version}-%{release}
763 %description ping
764 Provides check_ping of the Monitoring Plugins.
766 %files ping
767 %{plugindir}/check_ping
771 # check_procs
772 %package procs
773 Summary: Monitoring Plugins - check_procs
774 Requires: %{name} = %{version}-%{release}
776 %description procs
777 Provides check_procs of the Monitoring Plugins.
779 %files procs
780 %{plugindir}/check_procs
784 # check_radius
785 %package radius
786 Summary: Monitoring Plugins - check_radius
787 Requires: %{name} = %{version}-%{release}
789 %description radius
790 Provides check_radius of the Monitoring Plugins.
792 %files radius
793 %{plugindir}/check_radius
797 # check_real
798 %package real
799 Summary: Monitoring Plugins - check_real
800 Requires: %{name} = %{version}-%{release}
802 %description real
803 Provides check_real of the Monitoring Plugins.
805 %files real
806 %{plugindir}/check_real
810 # check_rpc
811 %package rpc
812 Summary: Monitoring Plugins - check_rpc
813 Requires: %{name} = %{version}-%{release}
815 %description rpc
816 Provides check_rpc of the Monitoring Plugins.
818 %files rpc
819 %{plugindir}/check_rpc
823 # check_sensors
824 %package sensors
825 Summary: Monitoring Plugins - check_sensors
826 Requires: %{name} = %{version}-%{release}
827 Requires: lm_sensors
829 %description sensors
830 Provides check_sensors of the Monitoring Plugins.
832 %files sensors
833 %{plugindir}/check_sensors
837 # check_smtp
838 %package smtp
839 Summary: Monitoring Plugins - check_smtp
840 Requires: %{name} = %{version}-%{release}
842 %description smtp
843 Provides check_smtp of the Monitoring Plugins.
845 %files smtp
846 %{plugindir}/check_smtp
850 # check_snmp
851 %package snmp
852 Summary: Monitoring Plugins - check_snmp
853 Requires: %{name} = %{version}-%{release}
854 Requires: net-snmp
856 %description snmp
857 Provides check_snmp of the Monitoring Plugins.
859 %files snmp
860 %{plugindir}/check_snmp
864 # check_ssh
865 %package ssh
866 Summary: Monitoring Plugins - check_ssh
867 Requires: %{name} = %{version}-%{release}
869 %description ssh
870 Provides check_ssh of the Monitoring Plugins.
872 %files ssh
873 %{plugindir}/check_ssh
877 # check_swap
878 %package swap
879 Summary: Monitoring Plugins - check_swap
880 Requires: %{name} = %{version}-%{release}
882 %description swap
883 Provides check_swap of the Monitoring Plugins.
885 %files swap
886 %{plugindir}/check_swap
890 # check_tcp
891 %package tcp
892 Summary: Monitoring Plugins - check_tcp
893 Requires: %{name} = %{version}-%{release}
895 %description tcp
896 Provides check_tcp of the Monitoring Plugins.
898 %files tcp
899 %{plugindir}/check_clamd
900 %{plugindir}/check_ftp
901 %{plugindir}/check_imap
902 %{plugindir}/check_jabber
903 %{plugindir}/check_nntp
904 %{plugindir}/check_nntps
905 %{plugindir}/check_pop
906 %{plugindir}/check_simap
907 %{plugindir}/check_spop
908 %{plugindir}/check_ssmtp
909 %{plugindir}/check_tcp
910 %{plugindir}/check_udp
914 # check_time
915 %package time
916 Summary: Monitoring Plugins - check_time
917 Requires: %{name} = %{version}-%{release}
919 %description time
920 Provides check_time of the Monitoring Plugins.
922 %files time
923 %{plugindir}/check_time
927 # check_ups
928 %package ups
929 Summary: Monitoring Plugins - check_ups
930 Requires: %{name} = %{version}-%{release}
932 %description ups
933 Provides check_ups of the Monitoring Plugins.
935 %files ups
936 %{plugindir}/check_ups
940 # check_uptime
941 %package uptime
942 Summary: Monitoring Plugins - check_uptime
943 Requires: %{name} = %{version}-%{release}
945 %description uptime
946 Provides check_uptime of the Monitoring Plugins.
948 %files uptime
949 %{plugindir}/check_uptime
953 # check_users
954 %package users
955 Summary: Monitoring Plugins - check_users
956 Requires: %{name} = %{version}-%{release}
958 %description users
959 Provides check_users of the Monitoring Plugins.
961 %files users
962 %{plugindir}/check_users
966 # check_wave
967 %package wave
968 Summary: Monitoring Plugins - check_wave
969 Requires: %{name} = %{version}-%{release}
971 %description wave
972 Provides check_wave of the Monitoring Plugins.
974 %files wave
975 %{plugindir}/check_wave