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

Revision 3958, 8.3 KB checked in by tomop, 13 years ago (diff)

nagios-3.2.3-1

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