nagios-vl.spec 8.3 KB

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