summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac3
-rw-r--r--monitoring-plugins.spec.in201
3 files changed, 2 insertions, 204 deletions
diff --git a/Makefile.am b/Makefile.am
index 517068c..9ee0800 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ SUBDIRS = gl tap lib plugins plugins-scripts plugins-root po @PERLMODS_DIR@
5EXTRA_DIST = config.rpath \ 5EXTRA_DIST = config.rpath \
6 ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ LEGAL NEWS \ 6 ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ LEGAL NEWS \
7 NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \ 7 NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \
8 NPTest.pm pkg monitoring-plugins.spec \ 8 NPTest.pm pkg \
9 config_test/Makefile config_test/run_tests config_test/child_test.c \ 9 config_test/Makefile config_test/run_tests config_test/child_test.c \
10 perlmods tools/build_perl_modules \ 10 perlmods tools/build_perl_modules \
11 tools/tinderbox_build 11 tools/tinderbox_build
diff --git a/configure.ac b/configure.ac
index 1fa7472..e9b154b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,8 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.59) 2AC_PREREQ(2.59)
3AC_INIT(monitoring-plugins,2.0) 3AC_INIT(monitoring-plugins,2.0)
4AC_CONFIG_SRCDIR(NPTest.pm) 4AC_CONFIG_SRCDIR(NPTest.pm)
5AC_CONFIG_FILES([gl/Makefile 5AC_CONFIG_FILES([gl/Makefile])
6 monitoring-plugins.spec])
7AC_CONFIG_AUX_DIR(build-aux) 6AC_CONFIG_AUX_DIR(build-aux)
8AM_INIT_AUTOMAKE([1.8.3]) 7AM_INIT_AUTOMAKE([1.8.3])
9AM_MAINTAINER_MODE([enable]) 8AM_MAINTAINER_MODE([enable])
diff --git a/monitoring-plugins.spec.in b/monitoring-plugins.spec.in
deleted file mode 100644
index f003498..0000000
--- a/monitoring-plugins.spec.in
+++ /dev/null
@@ -1,201 +0,0 @@
1# Macros
2%define isaix %(test "`uname -s`" = "AIX" && echo "1" || echo "0")
3%define islinux %(test "`uname -s`" = "Linux" && echo "1" || echo "0")
4%define isredhatfamily %(test -f /etc/redhat-release && echo "1" || echo "0")
5
6%if %{isaix}
7 %define _prefix /opt/nagios
8# %define _defaultdocdir %{_datadir}/doc
9%else
10 %define _libexecdir %{_exec_prefix}/lib/nagios/plugins
11%endif
12%define _sysconfdir /etc/nagios
13
14%define npusr nagios
15%define nphome /opt/nagios
16%define npgrp nagios
17
18Name: monitoring-plugins
19Version: @PACKAGE_VERSION@
20Release: @RELEASE@
21Summary: Host/service/network monitoring program plugins for Nagios and compatible
22
23Group: Applications/System
24License: GPL
25URL: https://www.monitoring-plugins.org/
26Source0: https://www.monitoring-plugins.org/download/%{name}-%{version}.tar.gz
27BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
28
29%define npdir %{_builddir}/%{name}-%{version}
30
31%if %{isaix}
32Prefix: %{_prefix}
33%else
34Prefix: %{_prefix}/lib/nagios/plugins
35%endif
36Packager: Karl DeBisschop <kdebisschop@users.sourceforge.net>
37Vendor: Monitoring Plugins Development Team
38Provides: monitoring-plugins
39
40%{!?custom:%global custom 0}
41Obsoletes: monitoring-plugins-custom monitoring-plugins-extras
42
43
44# Requires
45%if %{isaix}
46Requires: fping
47Requires: gawk
48Requires: net-snmp
49Requires: net-snmp-perl
50Requires: net-snmp-utils
51Requires: openldap
52Requires: openssl
53Requires: perl
54Requires: python
55Requires: openssl
56BuildRequires: fping
57BuildRequires: gawk
58BuildRequires: net-snmp
59BuildRequires: net-snmp-perl
60BuildRequires: net-snmp-utils
61BuildRequires: openldap-devel
62%endif
63%if %{isredhatfamily}
64Requires: bind-utils
65Requires: coreutils
66Requires: fping
67Requires: gawk
68Requires: grep
69Requires: iputils
70Requires: mysql
71Requires: net-snmp-utils
72Requires: ntp
73Requires: openldap
74Requires: openssl
75Requires: openssh-clients
76Requires: perl
77Requires: postgresql-libs
78Requires: procps
79Requires: python
80Requires: samba-client
81Requires: shadow-utils
82Requires: traceroute
83Requires: /usr/bin/mailq
84BuildRequires: bind-utils
85BuildRequires: coreutils
86BuildRequires: iputils
87BuildRequires: mysql-devel
88BuildRequires: net-snmp-utils
89BuildRequires: net-tools
90BuildRequires: ntp
91BuildRequires: openldap-devel
92BuildRequires: openssh-clients
93BuildRequires: openssl-devel
94BuildRequires: postgresql-devel
95BuildRequires: procps
96BuildRequires: samba-client
97BuildRequires: /usr/bin/mailq
98%endif
99
100
101%description
102
103Nagios is a program that will monitor hosts and services on your
104network, and to email or page you when a problem arises or is
105resolved. Nagios runs on a unix server as a background or daemon
106process, intermittently running checks on various services that you
107specify. The actual service checks are performed by separate "plugin"
108programs which return the status of the checks to the monitoring
109system. This package contains those plugins.
110
111
112%prep
113%setup -q
114
115
116%build
117%{?isaix: MAKE=gmake} ./configure \
118--prefix=%{_prefix} \
119--exec-prefix=%{_exec_prefix} \
120--libexecdir=%{_libexecdir} \
121--sysconfdir=%{_sysconfdir} \
122--datadir=%{_datadir} \
123--with-cgiurl=/nagios/cgi-bin
124ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-before
125ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-before
126ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-before
127make %{?_smp_mflags}
128ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-after
129ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-after
130ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-after
131
132%pre
133# Create `nagios' group on the system if necessary
134%if %{isaix}
135lsgroup %{npgrp} > /dev/null 2> /dev/null
136if [ $? -eq 2 ] ; then
137 mkgroup %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
138fi
139%endif
140%if %{islinux}
141getent group %{npgrp} > /dev/null 2> /dev/null
142if [ $? -ne 0 ] ; then
143 groupadd %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process.
144fi
145%endif
146
147# Create `nagios' user on the system if necessary
148%if %{isaix}
149lsuser %{npusr} > /dev/null 2> /dev/null
150if [ $? -eq 2 ] ; then
151 useradd -d %{nphome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
152 %nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
153fi
154%endif
155%if %{islinux}
156getent passwd %{npusr} > /dev/null 2> /dev/null
157if [ $? -ne 0 ] ; then
158 useradd -r -d %{nshome} -c "%{npusr}" -g %{npgrp} %{npusr} || \
159 %nnmmsg Unexpected error adding user "%{npusr}". Aborting install process.
160fi
161%endif
162
163%install
164rm -rf $RPM_BUILD_ROOT
165make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install
166%find_lang %{name}
167echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
168comm -13 %{npdir}/ls-plugins-before %{npdir}/ls-plugins-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
169echo "%defattr(755,root,root)" >> %{name}.lang
170comm -13 %{npdir}/ls-plugins-root-before %{npdir}/ls-plugins-root-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
171echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang
172comm -13 %{npdir}/ls-plugins-scripts-before %{npdir}/ls-plugins-scripts-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang
173echo "%{_libexecdir}/utils.pm" >> %{name}.lang
174echo "%{_libexecdir}/utils.sh" >> %{name}.lang
175echo "%{_libexecdir}/check_ldaps" >> %{name}.lang
176
177sed -i '/libnpcommon/d' %{name}.lang
178sed -i '/monitoring-plugins.mo/d' %{name}.lang
179
180%clean
181rm -rf $RPM_BUILD_ROOT
182
183
184%files -f %{name}.lang
185%config(missingok,noreplace) %{_sysconfdir}/command.cfg
186%doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS
187%doc ChangeLog command.cfg
188%if ! %{isaix}
189%{_datadir}/locale/de/LC_MESSAGES/monitoring-plugins.mo
190%{_datadir}/locale/fr/LC_MESSAGES/monitoring-plugins.mo
191%endif
192
193%changelog
194* Mon May 23 2005 Sean Finney <seanius@seanius.net> - cvs head
195- just include the nagios plugins directory, which will automatically include
196 all generated plugins (which keeps the build from failing on systems that
197 don't have all build-dependencies for every plugin)
198* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
199- extensive rewrite to facilitate processing into various distro-compatible specs
200* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
201- extensive rewrite to facilitate processing into various distro-compatible specs