%global debug_package %{nil} %global installdir %{_libdir}/nagios/plugins %global plugin_name check_updates Name: nagios-plugins-check-updates Version: 2.0.3 Release: 2.ndias%{?dist} Summary: Nagios plugin to check if RedHat or Fedora system is up-to-date License: GPLv3+ URL: https://github.com/matteocorti/check_updates Source0: https://github.com/matteocorti/check_updates/archive/refs/tags/v%{version}.tar.gz#/%{plugin_name}-%{version}.tar.gz BuildArch: noarch Patch0: PATCH-Makefile.PL BuildRequires: perl(Carp), perl(Getopt::Long) BuildRequires: perl(Monitoring::Plugin), perl(Monitoring::Plugin::Getopt) BuildRequires: perl(Monitoring::Plugin::Threshold), perl(POSIX) BuildRequires: perl(Module::Install), perl(Test::More) Requires: nagios-plugins, perl(English), perl(Readonly) Requires: perl(Monitoring::Plugin) %description Nagios plugin to check if RedHat or Fedora system is up-to-date The plugin uses either YUM, DNF or up2date depending on the operating system. %prep %setup -q -n %{plugin_name}-%{version} %patch0 -p0 %build perl Makefile.PL INSTALLDIRS=vendor INSTALLSCRIPT=%{_libdir}/nagios/plugins \ INSTALLVENDORSCRIPT=%{_libdir}/nagios/plugins make %{?_smp_mflags} %install make pure_install PERL_INSTALL_ROOT=%{buildroot} mkdir -p %{buildroot}/usr/share/bash-completion/completions/ sed -i '1d' check_updates.completion cp check_updates.completion %{buildroot}/usr/share/bash-completion/completions/check_updates find %{buildroot} -type f -name .packlist -exec rm -f {} \; find %{buildroot} -type f -name "*.pod" -exec rm -f {} \; %{_fixperms} %{buildroot}/* %files %doc AUTHORS.md CODE_OF_CONDUCT.md CONTRIBUTING.md COPYING COPYRIGHT Changes %{installdir}/%{plugin_name} %{_mandir}/man1/%{plugin_name}.1.gz %{_datadir}/bash-completion/completions/%{plugin_name} %changelog * Wed Nov 9 2022 Nuno Dias - 2.0.3-2.ndias - Update Requires * Wed Nov 9 2022 Nuno Dias - 2.0.3-1.ndias - Version 2.0.3 * Tue Feb 01 2022 Nuno Dias - 1.9.1-1.ndias - Version 1.9.1 * Wed Dec 29 2021 Nuno Dias - 1.8.5-1.ndias - Version 1.8.5