From 3d47ec8de2217f7bfd7eccb785903495245dc503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com> Date: Wed, 27 Jan 2016 08:20:36 +0100 Subject: Modernize spec file
--- perl-Perl-Critic-Compatibility.spec | 40 ++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/perl-Perl-Critic-Compatibility.spec b/perl-Perl-Critic-Compatibility.spec index c04fd4f..bb64e9d 100644 --- a/perl-Perl-Critic-Compatibility.spec +++ b/perl-Perl-Critic-Compatibility.spec @@ -1,22 +1,36 @@ Name: perl-Perl-Critic-Compatibility Version: 1.001 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Perl::Critic policies for compatibility with Perl versions License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Perl-Critic-Compatibility/ Source0: http://www.cpan.org/authors/id/E/EL/ELLIOTJS/Perl-Critic-Compatibility-%{version}.tar.gz BuildArch: noarch -BuildRequires: perl(Module::Build) +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: make +BuildRequires: perl +BuildRequires: perl(ExtUtils::MakeMaker) +# Run-time: +BuildRequires: perl(base) # Perl::Critic 1.083_001 rounded to 3 decimal digits -BuildRequires: perl(Perl::Critic) >= 1.084 +BuildRequires: perl(Perl::Critic::Policy) >= 1.084 +BuildRequires: perl(Perl::Critic::Utils) BuildRequires: perl(Readonly) +BuildRequires: perl(strict) BuildRequires: perl(version) -# Tests only: +BuildRequires: perl(warnings) +# Tests: +BuildRequires: perl(Carp) +BuildRequires: perl(English) BuildRequires: perl(Test::More) -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) # Perl::Critic 1.083_001 rounded to 3 decimal digits -Requires: perl(Perl::Critic) >= 1.084 +Requires: perl(Perl::Critic::Policy) >= 1.084 + +# Remove under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Perl::Critic::Policy\\)$ %description Some Perl::Critic policies that will help you keep your code compatible with @@ -27,24 +41,26 @@ This includes both backward and forward compatibility. %setup -q -n Perl-Critic-Compatibility-%{version} %build -%{__perl} Build.PL installdirs=core -./Build +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} %install -./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 -find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; +make pure_install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; %{_fixperms} $RPM_BUILD_ROOT/* %check -./Build test +make test %files -%defattr(-,root,root,-) %doc Changes README %{perl_privlib}/* %{_mandir}/man3/* %changelog +* Wed Jan 27 2016 Petr Pisar <ppi...@redhat.com> - 1.001-13 +- Modernize spec file + * Thu Jun 18 2015 Fedora Release Engineering <rel-...@lists.fedoraproject.org> - 1.001-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild -- cgit v0.11.2 http://pkgs.fedoraproject.org/cgit/perl-Perl-Critic-Compatibility.git/commit/?h=master&id=3d47ec8de2217f7bfd7eccb785903495245dc503 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@lists.fedoraproject.org http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org