source: projects/specs/trunk/n/nagios/nagios-vl.spec @ 521

Revision 521, 8.1 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

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