Blame nagios-plugins-systemd.spec

b7b00a5
%global nagiospluginsdir %{_libdir}/nagios/plugins
26fe763
Name:           nagios-plugins-systemd
b7b00a5
Version:        2.3.1
b7b00a5
Release:        %autorelease
f1abe99
Summary:        Nagios Plugin - check_systemd
b7b00a5
5a102b4
License:        LGPL-2.1-only
b7b00a5
URL:            https://exchange.icinga.com/joseffriedrich/check_systemd
b7b00a5
Source:         https://github.com/Josef-Friedrich/check_systemd/archive/v%{version}/%{name}-%{version}.tar.gz
5d478da
Patch0:         nagios-plugins-systemd.pymodule.patch
b7b00a5
b7b00a5
BuildRequires:  python3-devel
b7b00a5
2c88b5d
# Require the package that owns the plugins dir, as we install the plugin there.
705da82
Requires: nagios-common
2c88b5d
a3e3032
# The package does not contain any architecture-dependent things, but installs
a3e3032
# into an arch-dependend directory. Thus, it cannot be noarch, but it does not
a3e3032
# provide any debuginfo.
a3e3032
%global debug_package %{nil}
a3e3032
26fe763
%description
b7b00a5
This systemd check for nagios compatible monitoring systems will report a
b7b00a5
degraded systemd to your monitoring solution. It can also be used to monitor
26fe763
individual systemd services and timers units.
b7b00a5
b7b00a5
%prep
b7b00a5
%autosetup -p1 -n check_systemd-%{version}
b7b00a5
b7b00a5
b7b00a5
%generate_buildrequires
b7b00a5
%pyproject_buildrequires -t
b7b00a5
b7b00a5
b7b00a5
%build
b7b00a5
%pyproject_wheel
b7b00a5
b7b00a5
b7b00a5
%install
b7b00a5
%pyproject_install
b7b00a5
5d478da
%pyproject_save_files check_systemd
5d478da
b7b00a5
# The nagios plugin binaries must be in the nagiospluginsdir.
b7b00a5
mkdir -p %{buildroot}/%{nagiospluginsdir}
5d478da
mv %{buildroot}/%{_bindir}/check_systemd %{buildroot}/%{nagiospluginsdir}
b7b00a5
b7b00a5
b7b00a5
%check
44f663e
PYTHONPATH=%{buildroot}/%{nagiospluginsdir}:${PYTHONPATH} PATH=%{buildroot}/%{nagiospluginsdir}:${PATH} %tox
b7b00a5
b7b00a5
5d478da
%files -f %{pyproject_files}
b7b00a5
%doc README.*
b7b00a5
%license LICENSE
5d478da
%{nagiospluginsdir}/check_systemd
b7b00a5
b7b00a5
b7b00a5
%changelog
b7b00a5
%autochangelog