nagios-plugins-vl.spec 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. %define kernel_version 2.6.27
  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.13
  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. * Fri Jul 10 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.13-1
  77. - new upstream release.
  78. * Fri Apr 11 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 1.4.11-1
  79. - new upstream release.
  80. * Wed Nov 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.4-0vl1
  81. - initial build for Vine Linux based on DAG package.
  82. * Wed Nov 01 2006 Dag Wieers <dag@wieers.com> - 1.4.4-1 - 4481+/dries
  83. - Updated to release 1.4.4.
  84. - Fixed the problem where --with-pgsql defaults to 'yes'. (Jason Kim)
  85. * Mon May 29 2006 Dag Wieers <dag@wieers.com> - 1.4.3-1
  86. - Updated to release 1.4.3.
  87. * Tue Mar 07 2006 Dag Wieers <dag@wieers.com> - 1.4.2-1
  88. - Updated to release 1.4.2.
  89. * Fri Aug 05 2005 Dag Wieers <dag@wieers.com> - 1.4.1-1
  90. - Updated to release 1.4.1.
  91. * Sun Feb 13 2005 Dag Wieers <dag@wieers.com> - 1.4-2
  92. - Fixed setuid bit for ping and fping.
  93. - Added /sbin and /usr/sbin to $PATH.
  94. - Updated to release 1.4.
  95. * Tue Apr 27 2004 Dag Wieers <dag@wieers.com> - 1.3.1-10
  96. - Everything owned by user root. (James Wilkinson)
  97. * Mon Apr 26 2004 Dag Wieers <dag@wieers.com> - 1.3.1-9
  98. - Removed nagios requirement (for nrpe). (James Wilkinson)
  99. * Fri Apr 09 2004 Dag Wieers <dag@wieers.com> - 1.3.1-8
  100. - Added postgresql plugins for RHEL3.
  101. * Mon Mar 01 2004 Dag Wieers <dag@wieers.com> - 1.3.1-7
  102. - Added net-snmp-utils as a BuildRequires. (Dan Tucny)
  103. * Wed Feb 11 2004 Dag Wieers <dag@wieers.com> - 1.3.1-6
  104. - Changed BuildRequires to allow building for RHEL.
  105. * Tue Oct 14 2003 Dag Wieers <dag@wieers.com> - 1.3.1-5
  106. - Fixed a problem with check_ping on RH80. (Tom Diehl)
  107. - With user nagios and group nagios. (Tom Diehl)
  108. - Added commands-plugins.cfg.
  109. * Thu Oct 09 2003 Dag Wieers <dag@wieers.com> - 1.3.1-4
  110. - Added check_game.
  111. * Sat Oct 04 2003 Dag Wieers <dag@wieers.com> - 1.3.1-3
  112. - Fixed build environment /etc/mtab for check_disk command.
  113. * Mon Aug 18 2003 Dag Wieers <dag@wieers.com> - 1.3.1-2
  114. - Added check_cluster and check_dhcp.
  115. - Moved the needed perl module to perl include path.
  116. * Sat Jul 12 2003 Dag Wieers <dag@wieers.com> - 1.3.1-1
  117. - Fixed paths of some scripts.
  118. - Updated to release 1.3.1.
  119. * Fri Apr 18 2003 Dag Wieers <dag@wieers.com> - 1.3.0-0
  120. - Updated to release 1.3.0.
  121. * Mon Feb 17 2003 Dag Wieers <dag@wieers.com> - 1.2.93-0
  122. - Updated to release 1.3.0-beta3.
  123. - Initial package. (using DAR)