Modernize a spec file

This commit is contained in:
Petr Písař 2020-10-29 16:53:24 +01:00
parent 922e126dcd
commit 01808df959
2 changed files with 16 additions and 11 deletions

View File

@ -1,2 +0,0 @@
from Config import *
addFilter("spelling-error .* (freemem|totalmem)");

View File

@ -1,14 +1,19 @@
Name: perl-Sys-MemInfo
Version: 0.99
Release: 14%{?dist}
Release: 15%{?dist}
Summary: Memory information as Perl module
License: GPL+ or Artistic
URL: https://metacpan.org/release/Sys-MemInfo
Source0: https://cpan.metacpan.org/authors/id/S/SC/SCRESTO/Sys-MemInfo-%{version}.tar.gz
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: make
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl-interpreter
BuildRequires: perl(:VERSION) >= 5.6
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(File::Copy)
# Run-time:
BuildRequires: perl(DynaLoader)
@ -16,9 +21,9 @@ BuildRequires: perl(Exporter)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Tests:
BuildRequires: perl(Test::More)
BuildRequires: perl(Data::Dumper)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%{?perl_default_filter}
@ -30,13 +35,12 @@ bytes in totalmem and freemem variables.
%setup -q -n Sys-MemInfo-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS"
%{make_build}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
%{make_install}
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
%{_fixperms} $RPM_BUILD_ROOT/*
%check
@ -50,6 +54,9 @@ make test
%{_mandir}/man3/*
%changelog
* Thu Oct 29 2020 Petr Pisar <ppisar@redhat.com> - 0.99-15
- Modernize a spec file
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.99-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild