1 | %define kernel_version 2.6.35 |
---|
2 | %define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib) |
---|
3 | %define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch) |
---|
4 | |
---|
5 | %define _libexecdir %{_libdir}/nagios/plugins |
---|
6 | %define extraplugins cluster cluster2 cpqarray hltherm ipxping rbl timeout uptime |
---|
7 | |
---|
8 | Summary: Host/service/network monitoring program plugins for Nagios |
---|
9 | Name: nagios-plugins |
---|
10 | Version: 1.4.15 |
---|
11 | Release: 1%{_dist_release} |
---|
12 | License: GPL |
---|
13 | Group: Applications/System |
---|
14 | URL: http://nagiosplug.sourceforge.net/ |
---|
15 | |
---|
16 | Source: http://dl.sf.net/nagiosplug/nagios-plugins-%{version}.tar.gz |
---|
17 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
18 | |
---|
19 | AutoReq: no |
---|
20 | BuildRequires: fping, bind-utils, ntp, samba-client, openssh-clients |
---|
21 | BuildRequires: openldap-devel, mysql-devel, postgresql-devel |
---|
22 | BuildRequires: net-snmp-devel, net-snmp-utils |
---|
23 | BuildRequires: kernel-source = %{kernel_version} |
---|
24 | Requires: perl, net-snmp-perl, fping |
---|
25 | Requires: nagios |
---|
26 | |
---|
27 | %description |
---|
28 | This package contains the basic plugins necessary for use with the |
---|
29 | Nagios package. This package should install cleanly on almost any |
---|
30 | RPM-based system. |
---|
31 | |
---|
32 | But you may need additional packages. Depending on what plugins you |
---|
33 | use, the following packages may be required: |
---|
34 | |
---|
35 | bind-utils, mysql, net-snmp-utils, ntp, openldap, |
---|
36 | openssh-clients, openssl, postgresql-libs |
---|
37 | qstat, radiusclient, samba-client, sendmail |
---|
38 | |
---|
39 | %prep |
---|
40 | %setup |
---|
41 | |
---|
42 | ### Allow non-root builds |
---|
43 | %{__perl} -pi.orig -e 's|^INSTALL_OPTS|#INSTALL_OPTS|' configure |
---|
44 | |
---|
45 | %{__perl} -pi -e 's|/usr/src/linux|/usr/src/linux-%{kernel_version}|g' contrib/*.c contrib/*.h |
---|
46 | |
---|
47 | ### FIXME: Change to real perl and plugins location. (Please fix upstream) |
---|
48 | find contrib -type f -exec %{__perl} -pi -e ' |
---|
49 | s|^#!/.*bin/perl|#!%{__perl}|i; |
---|
50 | s|/usr/local/nagios/libexec/|%{_libdir}/nagios/plugins/|; |
---|
51 | s|/usr/libexec/nagios/plugins/|%{_libdir}/nagios/plugins/|; |
---|
52 | ' {} \; |
---|
53 | |
---|
54 | %build |
---|
55 | PATH="/sbin:/bin:/usr/sbin:/usr/sbin:$PATH" \ |
---|
56 | %configure \ |
---|
57 | --with-cgiurl="/nagios/cgi-bin" \ |
---|
58 | --with-mysql="%{_prefix}" \ |
---|
59 | --with-pgsql="%{_prefix}" |
---|
60 | # --with-nagios-user="nagios" \ |
---|
61 | # --with-nagios-group="nagios" \ |
---|
62 | %{__make} %{?_smp_mflags} |
---|
63 | |
---|
64 | ### Build some contrib plugins |
---|
65 | for plugin in %{extraplugins}; do |
---|
66 | ${CC:-%{__cc}} %{optflags} -I. -Igl/ -Ilib/ -Iplugins/ -I%{_datadir}/gettext/ -o check_$plugin contrib/check_$plugin.c || : |
---|
67 | done |
---|
68 | |
---|
69 | %install |
---|
70 | %{__rm} -rf %{buildroot} |
---|
71 | %makeinstall |
---|
72 | %find_lang %{name} |
---|
73 | |
---|
74 | %{__install} -d -m0755 %{buildroot}%{_libdir}/nagios/plugins/contrib/ |
---|
75 | %{__install} -m0755 contrib/check* %{buildroot}%{_libdir}/nagios/plugins/contrib/ |
---|
76 | %{__install} -m0755 check_* %{buildroot}%{_libdir}/nagios/plugins/ |
---|
77 | |
---|
78 | %{__install} -Dp -m0644 plugins-scripts/utils.pm %{buildroot}%{perl_vendorlib}/utils.pm |
---|
79 | %{__install} -Dp -m0644 command.cfg %{buildroot}%{_sysconfdir}/nagios/command-plugins.cfg |
---|
80 | |
---|
81 | %clean |
---|
82 | %{__rm} -rf %{buildroot} |
---|
83 | |
---|
84 | %files -f %{name}.lang |
---|
85 | #%defattr(-, nagios, nagios, 0755) |
---|
86 | %defattr(-, root, root, 0755) |
---|
87 | %doc ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CODING COPYING ChangeLog FAQ |
---|
88 | %doc INSTALL LEGAL NEWS README REQUIREMENTS SUPPORT THANKS command.cfg |
---|
89 | %config(noreplace) %{_sysconfdir}/nagios/* |
---|
90 | %dir %{_libdir}/nagios/ |
---|
91 | %{_libdir}/nagios/plugins/ |
---|
92 | %{perl_vendorlib}/utils.pm |
---|
93 | |
---|
94 | %changelog |
---|
95 | * Thu May 26 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.15-1 |
---|
96 | - new upstream release. |
---|
97 | |
---|
98 | * Fri Jul 10 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-1 |
---|
99 | - new upstream release. |
---|
100 | |
---|
101 | * Fri Apr 11 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 1.4.11-1 |
---|
102 | - new upstream release. |
---|
103 | |
---|
104 | * Wed Nov 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.4-0vl1 |
---|
105 | - initial build for Vine Linux based on DAG package. |
---|
106 | |
---|
107 | * Wed Nov 01 2006 Dag Wieers <dag@wieers.com> - 1.4.4-1 - 4481+/dries |
---|
108 | - Updated to release 1.4.4. |
---|
109 | - Fixed the problem where --with-pgsql defaults to 'yes'. (Jason Kim) |
---|
110 | |
---|
111 | * Mon May 29 2006 Dag Wieers <dag@wieers.com> - 1.4.3-1 |
---|
112 | - Updated to release 1.4.3. |
---|
113 | |
---|
114 | * Tue Mar 07 2006 Dag Wieers <dag@wieers.com> - 1.4.2-1 |
---|
115 | - Updated to release 1.4.2. |
---|
116 | |
---|
117 | * Fri Aug 05 2005 Dag Wieers <dag@wieers.com> - 1.4.1-1 |
---|
118 | - Updated to release 1.4.1. |
---|
119 | |
---|
120 | * Sun Feb 13 2005 Dag Wieers <dag@wieers.com> - 1.4-2 |
---|
121 | - Fixed setuid bit for ping and fping. |
---|
122 | - Added /sbin and /usr/sbin to $PATH. |
---|
123 | - Updated to release 1.4. |
---|
124 | |
---|
125 | * Tue Apr 27 2004 Dag Wieers <dag@wieers.com> - 1.3.1-10 |
---|
126 | - Everything owned by user root. (James Wilkinson) |
---|
127 | |
---|
128 | * Mon Apr 26 2004 Dag Wieers <dag@wieers.com> - 1.3.1-9 |
---|
129 | - Removed nagios requirement (for nrpe). (James Wilkinson) |
---|
130 | |
---|
131 | * Fri Apr 09 2004 Dag Wieers <dag@wieers.com> - 1.3.1-8 |
---|
132 | - Added postgresql plugins for RHEL3. |
---|
133 | |
---|
134 | * Mon Mar 01 2004 Dag Wieers <dag@wieers.com> - 1.3.1-7 |
---|
135 | - Added net-snmp-utils as a BuildRequires. (Dan Tucny) |
---|
136 | |
---|
137 | * Wed Feb 11 2004 Dag Wieers <dag@wieers.com> - 1.3.1-6 |
---|
138 | - Changed BuildRequires to allow building for RHEL. |
---|
139 | |
---|
140 | * Tue Oct 14 2003 Dag Wieers <dag@wieers.com> - 1.3.1-5 |
---|
141 | - Fixed a problem with check_ping on RH80. (Tom Diehl) |
---|
142 | - With user nagios and group nagios. (Tom Diehl) |
---|
143 | - Added commands-plugins.cfg. |
---|
144 | |
---|
145 | * Thu Oct 09 2003 Dag Wieers <dag@wieers.com> - 1.3.1-4 |
---|
146 | - Added check_game. |
---|
147 | |
---|
148 | * Sat Oct 04 2003 Dag Wieers <dag@wieers.com> - 1.3.1-3 |
---|
149 | - Fixed build environment /etc/mtab for check_disk command. |
---|
150 | |
---|
151 | * Mon Aug 18 2003 Dag Wieers <dag@wieers.com> - 1.3.1-2 |
---|
152 | - Added check_cluster and check_dhcp. |
---|
153 | - Moved the needed perl module to perl include path. |
---|
154 | |
---|
155 | * Sat Jul 12 2003 Dag Wieers <dag@wieers.com> - 1.3.1-1 |
---|
156 | - Fixed paths of some scripts. |
---|
157 | - Updated to release 1.3.1. |
---|
158 | |
---|
159 | * Fri Apr 18 2003 Dag Wieers <dag@wieers.com> - 1.3.0-0 |
---|
160 | - Updated to release 1.3.0. |
---|
161 | |
---|
162 | * Mon Feb 17 2003 Dag Wieers <dag@wieers.com> - 1.2.93-0 |
---|
163 | - Updated to release 1.3.0-beta3. |
---|
164 | - Initial package. (using DAR) |
---|