diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2004-03-02 06:17:53 +0000 |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2004-03-02 06:17:53 +0000 |
commit | e2e3017e7af883503eb42d28ba69a90274a016d2 (patch) | |
tree | f6c9013688a66e50e0b83449bbfb67c445b17abd | |
parent | 439bf19ea97fd72f058ea2124b39fd4b920fd8b2 (diff) | |
download | monitoring-plugins-e2e3017e7af883503eb42d28ba69a90274a016d2.tar.gz |
make specfile into a template which can generate a generic spec plus specs suitable for various repositories
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@837 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | nagios-plugins.spec.in | 140 | ||||
-rw-r--r-- | pkg/fedora/requires | 67 |
3 files changed, 101 insertions, 114 deletions
diff --git a/Makefile.am b/Makefile.am index f427a11a..21778407 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -12,14 +12,18 @@ localedir = $(datadir)/locale | |||
12 | DEFS = -DLOCALEDIR=\"$(localedir)\" | 12 | DEFS = -DLOCALEDIR=\"$(localedir)\" |
13 | 13 | ||
14 | dist-hook: | 14 | dist-hook: |
15 | make THANKS nagios-plugins.spec | 15 | make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec |
16 | 16 | ||
17 | test: | 17 | test: |
18 | cd plugins; $(MAKE) test | 18 | cd plugins; $(MAKE) test |
19 | cd plugins-scripts; $(MAKE) test | 19 | cd plugins-scripts; $(MAKE) test |
20 | 20 | ||
21 | nagios-plugins.spec: nagios-plugins.spec.in | 21 | nagios-plugins.spec: nagios-plugins.spec.in |
22 | sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;" $? > $@ | 22 | sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@ |
23 | |||
24 | pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in | ||
25 | $(top_srcdir)/mkinstalldirs pkg/fedora | ||
26 | sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@ | ||
23 | 27 | ||
24 | # Solaris pkgmk | 28 | # Solaris pkgmk |
25 | BUILDDIR = build-solaris | 29 | BUILDDIR = build-solaris |
diff --git a/nagios-plugins.spec.in b/nagios-plugins.spec.in index 0fafb003..65e5c979 100644 --- a/nagios-plugins.spec.in +++ b/nagios-plugins.spec.in | |||
@@ -1,103 +1,65 @@ | |||
1 | %{!?custom:%global custom 0} | 1 | Name: nagios-plugins |
2 | 2 | Version: %%{VERSION} | |
3 | %define archive nagios-plugins | 3 | Release: %%{RELEASE} |
4 | 4 | Summary: Host/service/network monitoring program plugins for Nagios | |
5 | %if %custom | ||
6 | %define name %{archive}-custom | ||
7 | %else | ||
8 | %define name %{archive} | ||
9 | %endif | ||
10 | 5 | ||
11 | %define version %%{VERSION} | 6 | Group: Applications/System |
12 | %define release %%{RELEASE} | 7 | License: GPL |
13 | %define source %{archive}-%{version} | 8 | URL: http://nagiosplug.sourceforge.net/ |
9 | Source0: http://dl.sf.net/sourceforge/nagiosplug/%{name}-%{version}.tar.gz | ||
10 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
14 | 11 | ||
15 | Name: %{name} | ||
16 | Version: %{version} | ||
17 | Release: %{release} | ||
18 | Copyright: GPL | ||
19 | Source: %{source}.tar.gz | ||
20 | BuildRoot: %{_tmppath}/%{name}-buildroot | ||
21 | Prefix: %{_prefix}/lib/nagios/plugins | 12 | Prefix: %{_prefix}/lib/nagios/plugins |
22 | Packager: Karl DeBisschop <kdebisschop@users.sourceforge.net> | 13 | Packager: Karl DeBisschop <kdebisschop@users.sourceforge.net> |
23 | Vendor: Nagios Plugin Development Group | 14 | Vendor: Nagios Plugin Development Group |
24 | Provides: nagios-plugins | 15 | Provides: nagios-plugins |
25 | %if %custom | ||
26 | Obsoletes: nagios-plugins nagios-plugins-extras | ||
27 | %else | ||
28 | Obsoletes: nagios-plugins-custom | ||
29 | %endif | ||
30 | AutoReqProv: no | ||
31 | Summary: Host/service/network monitoring program plugins for Nagios | ||
32 | Group: Applications/System | ||
33 | |||
34 | #BuildRequires: nagios-devel | ||
35 | #BuildRequires: postgresql-devel, openssl-devel, bind-devel, openldap-devel, mysql-devel | ||
36 | #BuildRequires: perl(Net::SNMP), %{?rh73:, ucd-snmp-devel} %{?rh80:, net-snmp-devel} %{?rh90:, net-snmp-devel} | ||
37 | #BuildRequires: fping, bind-utils, ntp, samba-client, openssh-clients, radiusclient-devel | ||
38 | #BuildRequires: qstat | ||
39 | |||
40 | #Requires: perl, perl(Net::SNMP), openssl | ||
41 | 16 | ||
42 | %description | 17 | %{!?custom:%global custom 0} |
43 | 18 | Obsoletes: nagios-plugins-custom nagios-plugins-extras | |
44 | Nagios is a program that will monitor hosts and services on your | ||
45 | network, and to email or page you when a problem arises or is | ||
46 | resolved. Nagios runs on a unix server as a background or daemon | ||
47 | process, intermittently running checks on various services that you | ||
48 | specify. The actual service checks are performed by separate "plugin" | ||
49 | programs which return the status of the checks to Nagios. | ||
50 | 19 | ||
51 | This package contains the basic plugins necessary for use with the | ||
52 | Nagios package. This package should install cleanly on almost any | ||
53 | RPM-based system. | ||
54 | 20 | ||
21 | # Requires | ||
55 | 22 | ||
56 | %package extras | ||
57 | Summary: Plugins which depend on the presence of other packages | ||
58 | Group: Applications/System | ||
59 | 23 | ||
60 | %description extras | 24 | %description |
61 | 25 | ||
62 | Nagios is a program that will monitor hosts and services on your | 26 | Nagios is a program that will monitor hosts and services on your |
63 | network, and to email or page you when a problem arises or is | 27 | network, and to email or page you when a problem arises or is |
64 | resolved. Nagios runs on a unix server as a background or daemon | 28 | resolved. Nagios runs on a unix server as a background or daemon |
65 | process, intermittently running checks on various services that you | 29 | process, intermittently running checks on various services that you |
66 | specify. The actual service checks are performed by separate "plugin" | 30 | specify. The actual service checks are performed by separate "plugin" |
67 | programs which return the status of the checks to Nagios. | 31 | programs which return the status of the checks to Nagios. This package |
68 | 32 | contains those plugins. | |
69 | This package contains plugins which use additional libraries or system | ||
70 | calls that are not installed on all systems. As a result, most users | ||
71 | will need to install the '--nodeps' option when invoking `rpm` | ||
72 | |||
73 | #Requires: fping, openldap, mysql, postgresql-libs | ||
74 | 33 | ||
75 | 34 | ||
76 | %prep | 35 | %prep |
77 | %setup -q -n %{source} | 36 | %setup -q |
78 | 37 | ||
79 | 38 | ||
80 | %build | 39 | %build |
81 | CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure \ | 40 | ./configure \ |
82 | --prefix=%{_prefix} \ | 41 | --prefix=%{_prefix} \ |
83 | --exec-prefix=%{_exec_prefix} \ | 42 | --exec-prefix=%{_exec_prefix} \ |
84 | --libexecdir=%{_exec_prefix}/lib/nagios/plugins \ | 43 | --libexecdir=%{_exec_prefix}/lib/nagios/plugins \ |
85 | --sysconfdir=%{_sysconfdir}/nagios \ | 44 | --sysconfdir=%{_sysconfdir}/nagios \ |
86 | --datadir=%{_datadir} \ | 45 | --datadir=%{_datadir} \ |
87 | --with-cgiurl=/nagios/cgi-bin | 46 | --with-cgiurl=/nagios/cgi-bin |
88 | make | 47 | make %{?_smp_mflags} |
89 | 48 | ||
90 | 49 | ||
91 | %install | 50 | %install |
51 | rm -rf $RPM_BUILD_ROOT | ||
92 | make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install | 52 | make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install |
93 | install -d ${RPM_BUILD_ROOT}/etc/nagios | 53 | install -d ${RPM_BUILD_ROOT}/etc/nagios |
94 | install -m 664 command.cfg ${RPM_BUILD_ROOT}/etc/nagios | 54 | install -m 664 command.cfg ${RPM_BUILD_ROOT}/etc/nagios |
55 | %find_lang %{name} | ||
56 | |||
95 | 57 | ||
96 | %clean | 58 | %clean |
97 | rm -rf $RPM_BUILD_ROOT | 59 | rm -rf $RPM_BUILD_ROOT |
98 | 60 | ||
99 | 61 | ||
100 | %files | 62 | %files -f %{name}.lang |
101 | %defattr(-,root,root) | 63 | %defattr(-,root,root) |
102 | %config(missingok,noreplace) /etc/nagios/command.cfg | 64 | %config(missingok,noreplace) /etc/nagios/command.cfg |
103 | %doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS | 65 | %doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS |
@@ -106,9 +68,13 @@ rm -rf $RPM_BUILD_ROOT | |||
106 | %dir %{_exec_prefix}/lib/nagios/plugins | 68 | %dir %{_exec_prefix}/lib/nagios/plugins |
107 | %{_datadir}/locale/de/LC_MESSAGES/nagios-plugins.mo | 69 | %{_datadir}/locale/de/LC_MESSAGES/nagios-plugins.mo |
108 | %{_datadir}/locale/fr/LC_MESSAGES/nagios-plugins.mo | 70 | %{_datadir}/locale/fr/LC_MESSAGES/nagios-plugins.mo |
71 | |||
109 | %if %custom | 72 | %if %custom |
73 | |||
110 | %{_exec_prefix}/lib/nagios/plugins/* | 74 | %{_exec_prefix}/lib/nagios/plugins/* |
75 | |||
111 | %else | 76 | %else |
77 | |||
112 | %{_exec_prefix}/lib/nagios/plugins/check_by_ssh | 78 | %{_exec_prefix}/lib/nagios/plugins/check_by_ssh |
113 | %{_exec_prefix}/lib/nagios/plugins/check_breeze | 79 | %{_exec_prefix}/lib/nagios/plugins/check_breeze |
114 | %{_exec_prefix}/lib/nagios/plugins/check_dig | 80 | %{_exec_prefix}/lib/nagios/plugins/check_dig |
@@ -155,11 +121,6 @@ rm -rf $RPM_BUILD_ROOT | |||
155 | %{_exec_prefix}/lib/nagios/plugins/utils.sh | 121 | %{_exec_prefix}/lib/nagios/plugins/utils.sh |
156 | %{_exec_prefix}/lib/nagios/plugins/urlize | 122 | %{_exec_prefix}/lib/nagios/plugins/urlize |
157 | %{_exec_prefix}/lib/nagios/plugins/check_file_age | 123 | %{_exec_prefix}/lib/nagios/plugins/check_file_age |
158 | %endif | ||
159 | |||
160 | %if ! %custom | ||
161 | %files extras | ||
162 | %defattr(775,root,root) | ||
163 | %{_exec_prefix}/lib/nagios/plugins/check_fping | 124 | %{_exec_prefix}/lib/nagios/plugins/check_fping |
164 | %{_exec_prefix}/lib/nagios/plugins/check_game | 125 | %{_exec_prefix}/lib/nagios/plugins/check_game |
165 | %{_exec_prefix}/lib/nagios/plugins/check_ldap | 126 | %{_exec_prefix}/lib/nagios/plugins/check_ldap |
@@ -172,50 +133,5 @@ rm -rf $RPM_BUILD_ROOT | |||
172 | %endif | 133 | %endif |
173 | 134 | ||
174 | %changelog | 135 | %changelog |
175 | * Wed Jan 17 2001 Karl DeBisschop <karl@debisschop.net> (1.2.9-1) | 136 | * Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1 |
176 | - switch from /usr/libexec to /usr/lib because FHS has no libexec | 137 | - extensive rewrite to facilitate processing into various distro-compatible specs |
177 | - use 'custom' macro define to merge with nagios-plugins-custom spec | ||
178 | - add check_game to extras | ||
179 | |||
180 | * Mon Jun 26 2000 Karl DeBisschop <karl@debisschop.net> | ||
181 | - Release 1.2.8-4 (check_ping bug fix) | ||
182 | - use bzip2 insted of gzip for mandrake compatibility | ||
183 | |||
184 | * Thu Jun 22 2000 Karl DeBisschop <karl@debisschop.net> | ||
185 | - Release 1.2.8-3 (bug fixes) | ||
186 | - Add macros to spec where possible | ||
187 | |||
188 | * Fri Jun 16 2000 Karl DeBisschop <karl@debisschop.net> | ||
189 | - Release 1.2.8-2 (bug fixes) | ||
190 | |||
191 | * Fri Jun 09 2000 Karl DeBisschop <karl@debisschop.net> | ||
192 | - Release to 1.2.8 | ||
193 | |||
194 | * Wed Jun 07 2000 Karl DeBisschop <karl@debisschop.net> | ||
195 | - Upgrade to 1.2.8pre7 | ||
196 | |||
197 | * Sat Jun 03 2000 Karl DeBisschop <karl@debisschop.net> | ||
198 | - Upgraded to 1.2.8pre5 | ||
199 | - use RPM_OPT_FALGS to set compiler options | ||
200 | - cahneg group to Applications/System | ||
201 | |||
202 | * Fri May 19 2000 Karl DeBisschop <karl@debisschop.net> | ||
203 | - Upgraded to 1.2.8pre3 (release-3) | ||
204 | |||
205 | * Mon Mar 20 2000 Karl DeBisschop <karl@debisschop.net> | ||
206 | - Upgraded to 1.2.8b2 | ||
207 | |||
208 | * Tue Dec 14 1999 Adam Jacob <adam@cybertrails.com> (1.2.7-1cvs) | ||
209 | - Upgraded package from 1.2.6 to 1.2.7 from the latest CVS code | ||
210 | - Modified SPEC file to contain the proper build_root stuff. :) | ||
211 | |||
212 | * Tue Oct 19 1999 Mike McHenry <mmchen@minn.net> (1.2.6) | ||
213 | - Upgraded package from 1.2.4 to 1.2.6 | ||
214 | - Resolved dependancy issue with libpq.so | ||
215 | - Added support for check_fping | ||
216 | |||
217 | * Fri Sep 03 1999 Mike McHenry <mmchen@minn.net> (1.2.4) | ||
218 | - Upgraded package from 1.2.2 to 1.2.4 | ||
219 | |||
220 | * Mon Aug 16 1999 Mike McHenry <mmchen@minn.net> (1.2.2) | ||
221 | - First RPM build (1.2.2) | ||
diff --git a/pkg/fedora/requires b/pkg/fedora/requires new file mode 100644 index 00000000..9d200142 --- /dev/null +++ b/pkg/fedora/requires | |||
@@ -0,0 +1,67 @@ | |||
1 | Requires: fileutils | ||
2 | Requires: gawk | ||
3 | Requires: grep | ||
4 | Requires: db4 | ||
5 | Requires: openldap | ||
6 | Requires: mysql | ||
7 | Requires: openssl | ||
8 | Requires: postgresql-libs | ||
9 | Requires: cyrus-sasl | ||
10 | Requires: net-snmp | ||
11 | Requires: ntp | ||
12 | Requires: pam | ||
13 | Requires: perl | ||
14 | Requires: python | ||
15 | Requires: samba-client | ||
16 | Requires: shadow-utils | ||
17 | Requires: textutils | ||
18 | Requires: traceroute | ||
19 | Requires: net-snmp-utils | ||
20 | Requires: zlib | ||
21 | Requires: /usr/bin/dig | ||
22 | Requires: /usr/bin/mailq | ||
23 | Requires: /usr/bin/ssh | ||
24 | Requires: /usr/bin/snmpgetnext | ||
25 | Requires: /usr/bin/snmpget | ||
26 | Requires: /usr/bin/who | ||
27 | Requires: /usr/bin/smbclient | ||
28 | Requires: /usr/sbin/ntpq | ||
29 | Requires: /usr/sbin/ntpdc | ||
30 | Requires: /usr/sbin/ntpdate | ||
31 | Requires: /usr/sbin/rpcinfo | ||
32 | Requires: /usr/bin/uptime | ||
33 | Requires: /usr/bin/host | ||
34 | Requires: /usr/bin/nslookup | ||
35 | Requires: /bin/ping | ||
36 | Requires: /bin/ps | ||
37 | BuildRequires: automake | ||
38 | BuildRequires: autoconf | ||
39 | BuildRequires: /bin/hostname | ||
40 | BuildRequires: /bin/basename | ||
41 | BuildRequires: db4-devel | ||
42 | BuildRequires: openldap-devel | ||
43 | BuildRequires: mysql-devel | ||
44 | BuildRequires: openssl-devel | ||
45 | BuildRequires: openssl | ||
46 | BuildRequires: cyrus-sasl-devel | ||
47 | BuildRequires: net-snmp-devel | ||
48 | BuildRequires: postgresql-devel | ||
49 | BuildRequires: zlib-devel | ||
50 | BuildRequires: pam-devel | ||
51 | BuildRequires: krb5-devel | ||
52 | BuildRequires: /usr/bin/dig | ||
53 | BuildRequires: /usr/bin/mailq | ||
54 | BuildRequires: /usr/bin/ssh | ||
55 | BuildRequires: /usr/bin/snmpgetnext | ||
56 | BuildRequires: /usr/bin/snmpget | ||
57 | BuildRequires: /usr/bin/who | ||
58 | BuildRequires: /usr/bin/smbclient | ||
59 | BuildRequires: /usr/sbin/ntpq | ||
60 | BuildRequires: /usr/sbin/ntpdc | ||
61 | BuildRequires: /usr/sbin/ntpdate | ||
62 | BuildRequires: /usr/sbin/rpcinfo | ||
63 | BuildRequires: /usr/bin/uptime | ||
64 | BuildRequires: /usr/bin/host | ||
65 | BuildRequires: /usr/bin/nslookup | ||
66 | BuildRequires: /bin/ping | ||
67 | BuildRequires: /bin/ps | ||