nagios-plugins-vl.spec 5.5 KB

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