nagios-vl.spec 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. Summary: Open Source host, service and network monitoring program
  2. Summary(ja): オープンソースホスト・サービス・ネットワーク監視プログラム
  3. Name: nagios
  4. Version: 3.1.2
  5. Release: 1%{_dist_release}
  6. License: GPL
  7. Group: Applications/System
  8. URL: http://www.nagios.org/
  9. Source: http://dl.sf.net/nagios/nagios-%{version}.tar.gz
  10. Source1: http://dl.sf.net/nagios/imagepak-base.tar.gz
  11. Patch: nagios-3.1.2-ja-utf8.patch
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  13. BuildRequires: gd-devel > 1.8, zlib-devel, libpng-devel, libjpeg-devel
  14. Requires: php5
  15. %description
  16. Nagios is an application, system and network monitoring application.
  17. It can escalate problems by email, pager or any other medium. It is
  18. also useful for incident or SLA reporting.
  19. Nagios is written in C and is designed as a background process,
  20. intermittently running checks on various services that you specify.
  21. The actual service checks are performed by separate "plugin" programs
  22. which return the status of the checks to Nagios. The plugins are
  23. located in the nagios-plugins package.
  24. %package devel
  25. Summary: Header files, libraries and development documentation for %{name}
  26. Group: Development/Libraries
  27. Requires: %{name} = %{version}-%{release}
  28. %description devel
  29. This package contains the header files, static libraries and development
  30. documentation for %{name}. If you like to develop programs using %{name},
  31. you will need to install %{name}-devel.
  32. %prep
  33. %setup
  34. %patch0 -p1
  35. %build
  36. %configure \
  37. --datadir="%{_datadir}/nagios" \
  38. --datarootdir="%{_datadir}/nagios" \
  39. --libexecdir="%{_libdir}/nagios/plugins" \
  40. --localstatedir="%{_localstatedir}/log/nagios" \
  41. --sbindir="%{_libdir}/nagios/cgi" \
  42. --sysconfdir="%{_sysconfdir}/nagios" \
  43. --with-cgiurl="/nagios/cgi-bin" \
  44. --with-command-user="apache" \
  45. --with-command-group="apache" \
  46. --with-gd-lib="%{_libdir}" \
  47. --with-gd-inc="%{_includedir}" \
  48. --with-htmurl="/nagios" \
  49. --with-init-dir="%{_initrddir}" \
  50. --with-lockfile="%{_localstatedir}/run/nagios.pid" \
  51. --with-mail="/bin/mail" \
  52. --with-nagios-user="nagios" \
  53. --with-nagios-group="nagios" \
  54. --enable-embedded-perl \
  55. --with-perlcache \
  56. --with-template-objects \
  57. --with-template-extinfo \
  58. --enable-event-broker
  59. %{__make} %{?_smp_mflags} all
  60. %{__make} %{?_smp_mflags} -C contrib
  61. %install
  62. %{__rm} -rf %{buildroot}
  63. %{__make} install install-init install-commandmode install-config \
  64. DESTDIR="%{buildroot}" \
  65. INSTALL_OPTS="" \
  66. COMMAND_OPTS="" \
  67. INIT_OPTS=""
  68. %{__make} install -C contrib \
  69. DESTDIR="%{buildroot}" \
  70. INSTALL_OPTS=""
  71. mkdir -p %{buildroot}%{_localstatedir}/log/nagios/spool/checkresults
  72. %{__install} -d -m0755 %{buildroot}%{_libdir}/nagios/plugins/eventhandlers/
  73. %{__cp} -afpv contrib/eventhandlers/* %{buildroot}%{_libdir}/nagios/plugins/eventhandlers/
  74. %{__install} -d -m0755 %{buildroot}%{_includedir}/nagios/
  75. %{__install} -p -m0644 include/*.h %{buildroot}%{_includedir}/nagios/
  76. %{__install} -Dp -m0644 sample-config/httpd.conf %{buildroot}%{_sysconfdir}/apache2/conf.d/nagios.conf
  77. ### Install logos
  78. tar -xvz -C %{buildroot}%{_datadir}/nagios/images/logos -f %{SOURCE1}
  79. %pre
  80. if ! /usr/bin/id nagios &>/dev/null; then
  81. /usr/sbin/useradd -r -d %{_localstatedir}/log/nagios -s /bin/sh -c "nagios" nagios ||:
  82. fi
  83. if ! /usr/bin/getent group nagiocmd &>/dev/null; then
  84. /usr/sbin/groupadd nagiocmd &>/dev/null ||:
  85. fi
  86. %post
  87. /sbin/chkconfig --add nagios
  88. if /usr/bin/id apache &>/dev/null; then
  89. if ! /usr/bin/id -Gn apache 2>/dev/null | grep -q nagios ; then
  90. /usr/sbin/usermod -G nagios,nagiocmd apache &>/dev/null
  91. fi
  92. fi
  93. %preun
  94. if [ $1 -eq 0 ]; then
  95. /sbin/service nagios stop &>/dev/null || :
  96. /sbin/chkconfig --del nagios
  97. fi
  98. %postun
  99. if [ $1 -eq 0 ]; then
  100. /usr/sbin/userdel nagios ||:
  101. /usr/sbin/groupdel nagios ||:
  102. fi
  103. /sbin/service nagios condrestart &>/dev/null || :
  104. %clean
  105. %{__rm} -rf %{buildroot}
  106. %files
  107. %defattr(-, root, root, 0755)
  108. %doc Changelog INSTALLING LICENSE README UPGRADING
  109. %config(noreplace) %{_sysconfdir}/apache2/conf.d/nagios.conf
  110. %config %{_initrddir}/nagios
  111. %{_bindir}/convertcfg
  112. %{_bindir}/nagios
  113. %{_bindir}/nagiostats
  114. %{_bindir}/p1.pl
  115. %{_bindir}/mini_epn
  116. %{_bindir}/new_mini_epn
  117. %{_libdir}/nagios/
  118. %{_datadir}/nagios/
  119. #%defattr(-, root, nagios, 0755)
  120. #%config(noreplace) %{_sysconfdir}/nagios/private/
  121. %defattr(-, nagios, nagios, 0755)
  122. %dir %{_sysconfdir}/nagios/
  123. %dir %{_sysconfdir}/nagios/objects
  124. %config(noreplace) %{_sysconfdir}/nagios/*.cfg
  125. %config(noreplace) %{_sysconfdir}/nagios/objects/*.cfg
  126. %defattr(-, nagios, apache, 2755)
  127. %dir %{_localstatedir}/log/nagios/
  128. %dir %{_localstatedir}/log/nagios/spool/checkresults
  129. %dir %{_localstatedir}/log/nagios/rw/
  130. ### FIXME: Start using /var/spool/nagios instead of /var/log/nagios/rw ??
  131. #%{_localstatedir}/spool/nagios/
  132. %files devel
  133. %defattr(-, root, root, 0755)
  134. %{_includedir}/nagios/
  135. %changelog
  136. * Fri Jul 10 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.2-1
  137. - new upstream release.
  138. - replaced ja patch.
  139. * Mon Jun 8 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.1.0-1
  140. - new upstream release.
  141. * Wed May 21 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 2.9-2
  142. - rebuilt with perl-5.10.0.
  143. * Thu Apr 10 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 2.9-1
  144. - new upstream release.
  145. - apply Japanese patch.
  146. * Mon Nov 13 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.5-0vl1
  147. - initial build for Vine Linux based on DAG package.
  148. * Wed Jul 19 2006 Dag Wieers <dag@wieers.com> - 2.5-1 - 4484+/dag
  149. - Updated to release 2.5.
  150. * Fri Jun 02 2006 Dag Wieers <dag@wieers.com> - 2.4-2
  151. - Make nagios owner of /etc/nagios. (Christop Maser)
  152. - Updated to release 2.4.
  153. * Mon May 29 2006 Dag Wieers <dag@wieers.com> - 2.3.1-2
  154. - Make nagios owner of /etc/nagios. (Christop Maser)
  155. * Wed May 17 2006 Dag Wieers <dag@wieers.com> - 2.3.1-1
  156. - Updated to release 2.3.1.
  157. * Wed May 03 2006 Dag Wieers <dag@wieers.com> - 2.3-1
  158. - Updated to release 2.3.
  159. * Sat Apr 08 2006 Dag Wieers <dag@wieers.com> - 2.2-1
  160. - Updated to release 2.2.
  161. * Tue Mar 28 2006 Dag Wieers <dag@wieers.com> - 2.1-1
  162. - Updated to release 2.1.
  163. * Wed Feb 08 2006 Dag Wieers <dag@wieers.com> - 2.0-2
  164. - Fixed the nagiocmd group creation. (Rick Johnson)
  165. - Added _without_perlcache macro. (Rick Johnson)
  166. * Wed Feb 08 2006 Dag Wieers <dag@wieers.com> - 2.0-1
  167. - Updated to release 2.0.
  168. * Thu Jan 12 2006 Dag Wieers <dag@wieers.com> - 2.0-0.rc2
  169. - Updated to release 2.0rc2.
  170. * Sun Jan 01 2006 Dag Wieers <dag@wieers.com> - 2.0-0.rc1
  171. - Updated to release 2.0rc1.
  172. * Mon Dec 12 2005 Dag Wieers <dag@wieers.com> - 2.0-0.b6.1
  173. - Updated to release 2.0b6.
  174. * Fri Aug 05 2005 Dag Wieers <dag@wieers.com> - 2.0-0.b4.1
  175. - Updated to release 2.0b4.
  176. * Mon May 23 2005 Dag Wieers <dag@wieers.com> - 2.0-0.b3.1
  177. - Use the actual 2.0b3 sourcecode, sigh. (Cameron Pitt-Downton)
  178. * Wed May 18 2005 Dag Wieers <dag@wieers.com> - 2.0-0.b3
  179. - Updated to release 2.0b3.
  180. * Mon Feb 21 2005 Tim Verhoeven <dj@rootshell.be> - 2.0-0.b2
  181. - Updated to release 2.0b2.
  182. * Sun Jan 02 2005 Dag Wieers <dag@wieers.com> - 2.0-0.b1
  183. * Updated to release 2.0b1.
  184. * Fri Nov 26 2004 Dag Wieers <dag@wieers.com> - 1.2-1
  185. * Fixed %%{_libdir} in httpd nagios.conf. (Thomas Zehetbauer)
  186. * Wed Feb 11 2004 Dag Wieers <dag@wieers.com> - 1.2-0
  187. - Added embedded perl patch for perl > 5.8. (Stanley Hopcroft)
  188. - Updated to release 1.2.
  189. * Wed Jan 28 2004 Dag Wieers <dag@wieers.com> - 1.1-6
  190. - Fixed the longstanding nagios.cmd problem. (Magnus Stenman)
  191. * Wed Oct 29 2003 Dag Wieers <dag@wieers.com> - 1.1-5
  192. - Fixed resource.cfg location from nagios.cfg. (Ragnar Wisloff)
  193. - Cleaned up perl one-liners.
  194. * Wed Oct 08 2003 Dag Wieers <dag@wieers.com> - 1.1-4
  195. - Removed --with-file-perfdata, use default. (Erik De Cock)
  196. * Mon Aug 25 2003 Dag Wieers <dag@wieers.com> - 1.1-3
  197. - Fixed the missing @MAIL_PROG@ problem in misccommands.cfg.
  198. * Mon Aug 18 2003 Dag Wieers <dag@wieers.com> - 1.1-2
  199. - Let %pre silently check for user nagios.
  200. - Added base imagepak.
  201. * Sat Jul 12 2003 Dag Wieers <dag@wieers.com> - 1.1-1
  202. - Disabled embedded perl.
  203. * Wed Jun 04 2003 Dag Wieers <dag@wieers.com> - 1.1-0
  204. - Updated to release 1.1.
  205. * Tue Jun 03 2003 Dag Wieers <dag@wieers.com> - 1.0-1
  206. - Don't restart webserver.
  207. * Sun Feb 16 2003 Dag Wieers <dag@wieers.com> - 1.0-0
  208. - Initial package. (using DAR)