-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnagios-agents-metadata.spec
69 lines (61 loc) · 2.39 KB
/
nagios-agents-metadata.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# spec file for package resource-agents
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Since this spec file supports multiple distributions, ensure we
# use the correct group for each.
#
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
%define pkg_group System Environment/Daemons
%else
%define pkg_group Productivity/Clustering/HA
%endif
%if ! %{defined _rundir}
%define _rundir %{_localstatedir}/run
%endif
Name: nagios-agents-metadata
Summary: OCF metadata for nagios agents
License: GPL-2.0+ and GPL-3.0
Group: %{pkg_group}
Version: 1.0
Release: 0
Url: https://github.com/ClusterLabs/nagios-agents-metadata
Source: nagios-agents-metadata-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: nagios-plugins-metadata
Requires: monitoring-plugins-fping
Requires: monitoring-plugins-http
Requires: monitoring-plugins-ldap
Requires: monitoring-plugins-mysql
Requires: monitoring-plugins-pgsql
Requires: monitoring-plugins-tcp
Requires: resource-agents
%description
XML files containing metadata which facilitates using nagios
plugins as resource agents. These files were produced from help
pages of individual nagios plugins.
%install
###########################################################
# install nagios plugins XML metadata
tar -xjf %{SOURCE}
mkdir -p %{buildroot}%{_datadir}/nagios/plugins-metadata
for file in $(find plugins-metadata -type f); do
install -m 644 $file %{buildroot}%{_datadir}/nagios/plugins-metadata
done
###########################################################
%files
###########################################################
%defattr(-,root,root)
%dir %{_datadir}/nagios
%dir %{_datadir}/nagios/plugins-metadata
%attr(0644,root,root) %{_datadir}/nagios/plugins-metadata/*
%changelog