File monitoring-plugins-asterisk.spec of Package monitoring-plugins-asterisk

#
# spec file for package monitoring-plugins-asterisk
#
# Copyright (c) 2013-2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015-2016 SUSE LINUX 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           monitoring-plugins-asterisk
Version:        0.1
Release:        100
License:        GPL-2.0
Summary:        Collection of plugins for Asterisk PBX
Url:            http://exchange.nagios.org/directory/Plugins/Telephony/Asterisk
Group:          System/Monitoring
Source0:        check_asterisk_peers
Source1:        README.SUSE-check_asterisk_peers
Source2:        usr.lib.nagios.plugins.check_asterisk_peers

BuildRequires:  nagios-devel
BuildRequires:  nagios-rpm-macros

%if 0%{?suse_version}
Recommends:     apparmor-parser
%else
Requires:       apparmor-parser
%endif

Requires:       apparmor-profiles
Requires:       monitoring-plugins-common

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%define		apparmor %{_sysconfdir}/apparmor.d

%description
This plugin checks Asterisk peers via Asterisk CLI commands to make sure
they are in a healthy state.

%prep
%{__cp} %{SOURCE1} ./README.SUSE-check_asterisk_peers

%build

%install
install -D -m755 %{SOURCE0} %{buildroot}%{nagios_plugindir}/check_asterisk_peers
mkdir -p %{buildroot}%apparmor
install -D -m644 %{SOURCE2} %{buildroot}%apparmor/usr.lib.nagios.plugins.check_asterisk_peers

%files
%defattr(-,root,root)
%doc README.SUSE-check_asterisk_peers
%dir %{nagios_plugindir}
%dir %{_sysconfdir}/apparmor.d
%attr(0755,root,root) %{nagios_plugindir}/check_asterisk_peers
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_asterisk_peers

%changelog
openSUSE Build Service is sponsored by