File monitoring-plugins-pve.spec of Package monitoring-plugins-pve
#
# spec file for package monitoring-plugins-pve
#
# Copyright (c) 2024-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/
#
%define realname check_pve
Name: monitoring-plugins-pve
Version: 1.5.0
Release: 0
Summary: Icinga check command for Proxmox VE via API
License: GPL-2.0-only
Group: System/Monitoring
URL: https://github.com/nbuchwitz/check_pve
Source: https://github.com/nbuchwitz/check_pve/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: nagios-rpm-macros
Requires: python3-packaging
Requires: python3-requests
BuildArch: noarch
%description
A monitoring plugin to check Proxmox VE via API.
%prep
%setup -q -n %{realname}-%{version}
sed -i 's|%{_bindir}/env python3|%{_bindir}/python3|g' check_pve.py
sed -i 's|check_pve.py|check_pve|g' icinga2/command.conf
%build
%install
install -Dm0755 check_pve.py %{buildroot}/%{nagios_plugindir}/check_pve
%files
%license LICENSE
%doc README.md
%doc icinga2/command.conf
%doc icinga2/service.conf
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%{nagios_plugindir}/check_pve
%changelog