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

#
# spec file for monitoring-plugins-time_http
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# 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-time_http
Version:        0.1.2
Release:        0
Summary:        Check the clock skew of a web server by comparing the HTTP Date header with the local time 
License:        MIT
Group:          System/Monitoring
URL:            https://github.com/dnmvisser/nagios_check_time_by_http_date
Source0:        https://github.com/dnmvisser/nagios_check_time_by_http_date/archive/refs/tags/v%{version}.tar.gz#/nagios_check_time_by_http_date-%{version}.tar.gz
BuildRequires:  nagios-rpm-macros
Requires:       python3-requests
BuildArch:      noarch

%description
A Nagios check to monitor the time offset between a web server (by examining
its HTTP Date response header) and the local system (i.e. where the plugin is
executed).

%prep
%autosetup -n nagios_check_time_by_http_date-%{version}
sed -e 's|#!/usr/bin/env python3|#!/usr/bin/python3|g' -i check_time_http

%build

%install
install -D -m 0755 check_time_http %{buildroot}/%{nagios_plugindir}/check_time_http

%files
%license LICENSE
%doc README.md
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_time_http

%changelog
openSUSE Build Service is sponsored by