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

#
# spec file for package monitoring-plugins-ssl_validity
#
# 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 http://bugs.opensuse.org/
#


Name:           monitoring-plugins-ssl_validity
Version:        20161205
Release:        0
Summary:        Check validity of SSL certificates
License:        BSD-3-Clause
Group:          System/Monitoring
Url:            https://exchange.nagios.org/directory/Plugins/Security/check_ssl_validity/details
Source0:        https://raw.githubusercontent.com/anordby/plugins/master/nagios/check_ssl_validity
Patch0:         skip_crl_validity_check.patch
BuildRequires:  nagios-rpm-macros
Requires:       perl(Getopt::Std)
Requires:       perl(File::Temp)
Requires:       perl(Crypt::X509)
Requires:       perl(Date::Parse)
Requires:       perl(Digest::MD5)
Requires:       perl(LWP::Simple)
# nagios can execute the script with embedded perl
Recommends:     perl
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Checks all of the following:
* Fetch SSL certificate from URL (on optional given host)
* Does the certificate contain our hostname?
* Has the certificate expired?
* Download (and cache) CRL
* Has the certificate been revoked?

%prep
%setup -c nagios -n nagios -T
cp -a %{S:0} .
%patch0 -p0

%build
#
%install
install -D -m755 check_ssl_validity %{buildroot}%{nagios_plugindir}/check_ssl_validity

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
# avoid build dependecy of nagios - own the dirs
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_ssl_validity

%changelog