diff options
author | Monitoring Plugins Development Team <devel@monitoring-plugins.org> | 2014-01-18 03:40:24 -0500 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2014-01-19 14:18:47 -0500 |
commit | 63734f52ab1b4b2c17545b26fc41016d6bbd80bd (patch) | |
tree | dcd7aa3fd9a2a6a69a47d3a7e6a18d034426087a /nagios-plugins.spec.in | |
parent | 9db763963f3993f923619a2147e4313b09f12134 (diff) | |
download | monitoring-plugins-63734f52ab1b4b2c17545b26fc41016d6bbd80bd.tar.gz |
Project rename initial commit.
This is an initial take at renaming the project to Monitoring Plugins.
It's not expected to be fully complete, and it is expected to break
things (The perl module for instance). More testing will be required
before this goes mainline.
Diffstat (limited to 'nagios-plugins.spec.in')
-rw-r--r-- | nagios-plugins.spec.in | 199 |
1 files changed, 0 insertions, 199 deletions
diff --git a/nagios-plugins.spec.in b/nagios-plugins.spec.in deleted file mode 100644 index 17a44c36..00000000 --- a/nagios-plugins.spec.in +++ /dev/null | |||
@@ -1,199 +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 | |||
18 | Name: nagios-plugins | ||
19 | Version: @PACKAGE_VERSION@ | ||
20 | Release: @RELEASE@ | ||
21 | Summary: Host/service/network monitoring program plugins for Nagios | ||
22 | |||
23 | Group: Applications/System | ||
24 | License: GPL | ||
25 | URL: http://nagiosplug.sourceforge.net/ | ||
26 | Source0: http://dl.sf.net/sourceforge/nagiosplug/%{name}-%{version}.tar.gz | ||
27 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
28 | |||
29 | %define npdir %{_builddir}/%{name}-%{version} | ||
30 | |||
31 | %if %{isaix} | ||
32 | Prefix: %{_prefix} | ||
33 | %else | ||
34 | Prefix: %{_prefix}/lib/nagios/plugins | ||
35 | %endif | ||
36 | Packager: Karl DeBisschop <kdebisschop@users.sourceforge.net> | ||
37 | Vendor: Nagios Plugin Development Group | ||
38 | Provides: nagios-plugins | ||
39 | |||
40 | %{!?custom:%global custom 0} | ||
41 | Obsoletes: nagios-plugins-custom nagios-plugins-extras | ||
42 | |||
43 | |||
44 | # Requires | ||
45 | %if %{isaix} | ||
46 | Requires: fping | ||
47 | Requires: gawk | ||
48 | Requires: net-snmp | ||
49 | Requires: net-snmp-perl | ||
50 | Requires: net-snmp-utils | ||
51 | Requires: openldap | ||
52 | Requires: openssl | ||
53 | Requires: perl | ||
54 | Requires: python | ||
55 | Requires: openssl | ||
56 | BuildRequires: fping | ||
57 | BuildRequires: gawk | ||
58 | BuildRequires: net-snmp | ||
59 | BuildRequires: net-snmp-perl | ||
60 | BuildRequires: net-snmp-utils | ||
61 | BuildRequires: openldap-devel | ||
62 | %endif | ||
63 | %if %{isredhatfamily} | ||
64 | Requires: bind-utils | ||
65 | Requires: coreutils | ||
66 | Requires: fping | ||
67 | Requires: gawk | ||
68 | Requires: grep | ||
69 | Requires: iputils | ||
70 | Requires: mysql | ||
71 | Requires: net-snmp-utils | ||
72 | Requires: ntp | ||
73 | Requires: openldap | ||
74 | Requires: openssl | ||
75 | Requires: openssh-clients | ||
76 | Requires: perl | ||
77 | Requires: postgresql-libs | ||
78 | Requires: procps | ||
79 | Requires: python | ||
80 | Requires: samba-client | ||
81 | Requires: shadow-utils | ||
82 | Requires: traceroute | ||
83 | Requires: /usr/bin/mailq | ||
84 | BuildRequires: bind-utils | ||
85 | BuildRequires: coreutils | ||
86 | BuildRequires: iputils | ||
87 | BuildRequires: mysql-devel | ||
88 | BuildRequires: net-snmp-utils | ||
89 | BuildRequires: net-tools | ||
90 | BuildRequires: ntp | ||
91 | BuildRequires: openldap-devel | ||
92 | BuildRequires: openssh-clients | ||
93 | BuildRequires: openssl-devel | ||
94 | BuildRequires: postgresql-devel | ||
95 | BuildRequires: procps | ||
96 | BuildRequires: samba-client | ||
97 | BuildRequires: /usr/bin/mailq | ||
98 | %endif | ||
99 | |||
100 | |||
101 | %description | ||
102 | |||
103 | Nagios is a program that will monitor hosts and services on your | ||
104 | network, and to email or page you when a problem arises or is | ||
105 | resolved. Nagios runs on a unix server as a background or daemon | ||
106 | process, intermittently running checks on various services that you | ||
107 | specify. The actual service checks are performed by separate "plugin" | ||
108 | programs which return the status of the checks to Nagios. This package | ||
109 | 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 | ||
124 | ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-before | ||
125 | ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-before | ||
126 | ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-before | ||
127 | make %{?_smp_mflags} | ||
128 | ls -1 %{npdir}/plugins > %{npdir}/ls-plugins-after | ||
129 | ls -1 %{npdir}/plugins-root > %{npdir}/ls-plugins-root-after | ||
130 | ls -1 %{npdir}/plugins-scripts > %{npdir}/ls-plugins-scripts-after | ||
131 | |||
132 | %pre | ||
133 | # Create `nagios' group on the system if necessary | ||
134 | %if %{isaix} | ||
135 | lsgroup %{npgrp} > /dev/null 2> /dev/null | ||
136 | if [ $? -eq 2 ] ; then | ||
137 | mkgroup %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process. | ||
138 | fi | ||
139 | %endif | ||
140 | %if %{islinux} | ||
141 | getent group %{npgrp} > /dev/null 2> /dev/null | ||
142 | if [ $? -ne 0 ] ; then | ||
143 | groupadd %{npgrp} || %nnmmsg Unexpected error adding group "%{npgrp}". Aborting install process. | ||
144 | fi | ||
145 | %endif | ||
146 | |||
147 | # Create `nagios' user on the system if necessary | ||
148 | %if %{isaix} | ||
149 | lsuser %{npusr} > /dev/null 2> /dev/null | ||
150 | if [ $? -eq 2 ] ; then | ||
151 | useradd -d %{nphome} -c "%{npusr}" -g %{npgrp} %{npusr} || \ | ||
152 | %nnmmsg Unexpected error adding user "%{npusr}". Aborting install process. | ||
153 | fi | ||
154 | %endif | ||
155 | %if %{islinux} | ||
156 | getent passwd %{npusr} > /dev/null 2> /dev/null | ||
157 | if [ $? -ne 0 ] ; then | ||
158 | useradd -r -d %{nshome} -c "%{npusr}" -g %{npgrp} %{npusr} || \ | ||
159 | %nnmmsg Unexpected error adding user "%{npusr}". Aborting install process. | ||
160 | fi | ||
161 | %endif | ||
162 | |||
163 | %install | ||
164 | rm -rf $RPM_BUILD_ROOT | ||
165 | make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install | ||
166 | build-aux/install-sh -c -d ${RPM_BUILD_ROOT}%{_sysconfdir} | ||
167 | build-aux/install-sh -c -m 664 command.cfg ${RPM_BUILD_ROOT}%{_sysconfdir} | ||
168 | %find_lang %{name} | ||
169 | echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang | ||
170 | comm -13 %{npdir}/ls-plugins-before %{npdir}/ls-plugins-after | egrep -v "\.o$|^\." | gawk -v libexecdir=%{_libexecdir} '{printf( "%s/%s\n", libexecdir, $0);}' >> %{name}.lang | ||
171 | echo "%defattr(755,root,root)" >> %{name}.lang | ||
172 | comm -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 | ||
173 | echo "%defattr(755,%{npusr},%{npgrp})" >> %{name}.lang | ||
174 | comm -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 | ||
175 | echo "%{_libexecdir}/utils.pm" >> %{name}.lang | ||
176 | echo "%{_libexecdir}/utils.sh" >> %{name}.lang | ||
177 | |||
178 | %clean | ||
179 | rm -rf $RPM_BUILD_ROOT | ||
180 | |||
181 | |||
182 | %files -f %{name}.lang | ||
183 | %config(missingok,noreplace) %{_sysconfdir}/command.cfg | ||
184 | %doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS | ||
185 | %doc ChangeLog command.cfg | ||
186 | %if ! %{isaix} | ||
187 | %{_datadir}/locale/de/LC_MESSAGES/nagios-plugins.mo | ||
188 | %{_datadir}/locale/fr/LC_MESSAGES/nagios-plugins.mo | ||
189 | %endif | ||
190 | |||
191 | %changelog | ||
192 | * Mon May 23 2005 Sean Finney <seanius@seanius.net> - cvs head | ||
193 | - just include the nagios plugins directory, which will automatically include | ||
194 | all generated plugins (which keeps the build from failing on systems that | ||
195 | don't have all build-dependencies for every plugin) | ||
196 | * Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1 | ||
197 | - extensive rewrite to facilitate processing into various distro-compatible specs | ||
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 | ||