File monitoring-eventhandlers-send_messages.spec of Package monitoring-eventhandlers-send_messages

# spec file for package monitoring-eventhandlers-send_messages
# Copyright (c) 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

Name:           monitoring-eventhandlers-send_messages
Summary:        Commandline tools for sending Nagios notifications
License:        GPL-2.0+
Group:          System/Monitoring
Version:        0.1.4
Release:        0
Source0:        %{name}-%{version}.tar.bz2
Obsoletes:      nagios-eventhandlers-send_messages <= 0.1.3
Provides:       nagios-eventhandlers-send_messages = %{version}-%{release}
# nagios can execute the script with embedded perl, so weaken the dependency
Recommends:     perl 
BuildArch:      noarch
BuildRequires:  nagios-rpm-macros
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Instead of using the standard printf commandline given by Nagios, you can use
these scripts to generate notification Emails or IRC messages with Nagios.

The scripts will take care of unset variables, formatting URLs and add the
ability to format the output in your way.

%setup -q


install -D -m755 send_irc_message %buildroot/%{nagios_eventhandlerdir}/send_irc_message
install    -m755 send_mail %buildroot/%{nagios_eventhandlerdir}/send_mail
install -D -m644 send_irc_message.1.gz %buildroot/%{_mandir}/man1/send_irc_message.1.gz
install    -m644 send_mail.1.gz %buildroot/%{_mandir}/man1/send_mail.1.gz
install -D -m644 send_mail.cfg %buildroot/%nagios_sysconfdir/send_mail.cfg
install -D -m644 send_irc_message.cfg %buildroot/%nagios_sysconfdir/send_irc_message.cfg

mkdir -p %{buildroot}/%nagios_logdir

rm -rf %buildroot

%doc nagios_send_mail_command.cfg COPYING
# avoid build dependecy of nagios - own the dirs
%dir %{nagios_sysconfdir}
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%dir %{nagios_eventhandlerdir}
%config(noreplace) %{nagios_sysconfdir}/*