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

#
# spec file for package monitoring-plugins-sophos_central
#
# Copyright (c) 2024, 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/
#


%define realname check_sophos_central
Name:           monitoring-plugins-sophos_central
Version:        0.3.0+git20240909
Release:        0
Summary:        Checks status of alerts and endpoints of the Sophos Central cloud service
License:        GPL-3.0-or-later
Group:          System/Monitoring
URL:            https://github.com/NETWAYS/check_sophos_central
#Git-Clone:     https://github.com/NETWAYS/check_sophos_central.git
Source0:        %{realname}-%{version}.tar.gz
Source1:        vendor.tar.gz
BuildRequires:  go
BuildRequires:  golang-packaging
BuildRequires:  nagios-rpm-macros
%{go_provides}

%description
Icinga/Nagios check plugin for the status of alerts and endpoints via
the API of the Sophos Central cloud service.

%prep
%autosetup -a 1 -n %{realname}-%{version}

%build
go build \
  -mod=vendor \
  -buildmode=pie \
  -o check_sophos_central .

%install
install -Dm 0755 check_sophos_central %{buildroot}/%{nagios_plugindir}/check_sophos_central

%check
go test -v

%files
%license COPYING
%doc CHANGELOG.md README.md
%dir %{nagios_libdir}
%dir %{nagios_plugindir}/
%{nagios_plugindir}/check_sophos_central

%changelog
openSUSE Build Service is sponsored by