# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Name: perl-Perl-Critic-Pulp Version: 99 Release: 7.%{__distinit}%{__distvers} Summary: Some add-on perlcritic policies License: GPL-3.0-or-later URL: http://user42.tuxfamily.org/perl-critic-pulp/index.html Source0: https://cpan.metacpan.org/modules/by-module/Perl/Perl-Critic-Pulp-%{version}.tar.gz BuildArch: noarch # Build: BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) # Run-time: BuildRequires: perl(base) BuildRequires: perl(constant) BuildRequires: perl(Exporter) BuildRequires: perl(File::Temp) BuildRequires: perl(IO::String) >= 1.02 BuildRequires: perl(List::MoreUtils) >= 0.24 BuildRequires: perl(List::Util) BuildRequires: perl(Perl::Critic) >= 1.084 BuildRequires: perl(Perl::Critic::Policy) >= 1.084 BuildRequires: perl(Perl::Critic::Utils) >= 1.100 BuildRequires: perl(Perl::Critic::Utils::PPI) BuildRequires: perl(Perl::Critic::Violation) BuildRequires: perl(Pod::Escapes) BuildRequires: perl(Pod::MinimumVersion) >= 50 BuildRequires: perl(Pod::ParseLink) BuildRequires: perl(Pod::Parser) BuildRequires: perl(PPI) >= 1.220 BuildRequires: perl(PPI::Document) BuildRequires: perl(Scalar::Util) BuildRequires: perl(version) # Tests only: BuildRequires: perl(Data::Dumper) BuildRequires: perl(PPI::Dumper) BuildRequires: perl(Test::More) # Optional tests only: BuildRequires: perl(Perl::MinimumVersion) # Run-time: %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(IO::String) >= 1.02 Requires: perl(List::MoreUtils) >= 0.24 Requires: perl(Perl::Critic) >= 1.084 Requires: perl(Pod::MinimumVersion) >= 50 Requires: perl(PPI::Document) # This is plug-in into Test::More - depend on it even if not mentioned in the code Requires: perl(Test::More) # Filter private parsers and redefinitions %global badprovs Perl::MinimumVersion %global badprovs %{badprovs}|Perl::Critic::PodParser::ProhibitVerbatimMarkup %global badprovs %{badprovs}|Perl::Critic::Policy::Documentation::ProhibitAdjacentLinks::Parser %global badprovs %{badprovs}|Perl::Critic::Pulp::PodMinimumVersionViolation %global badprovs %{badprovs}|Perl::Critic::Pulp::PodParser::ProhibitBadAproposMarkup %global badprovs %{badprovs}|Perl::Critic::Pulp::PodParser::ProhibitDuplicateSeeAlso %global badprovs %{badprovs}|Perl::Critic::Pulp::PodParser::ProhibitLinkToSelf %global badprovs %{badprovs}|Perl::Critic::Pulp::PodParser::ProhibitParagraphTwoDots %global badprovs %{badprovs}|Perl::Critic::Pulp::PodParser::ProhibitUnbalancedParens %global badprovs %{badprovs}|Perl::Critic::Pulp::PodParser::RequireFinalCut %global badprovs %{badprovs}|Perl::Critic::Pulp::PodParser::RequireLinkedURLs %global badprovs %{badprovs}|Perl::Critic::Pulp::ProhibitDuplicateHashKeys::Qword %global __provides_exclude perl\\((%{badprovs})\\)\\s*$ %description This is a collection of add-on policies for Perl::Critic. They're under a "pulp" theme plus other themes according to their purpose (see "POLICY THEMES" in Perl::Critic). %prep %setup -q -n Perl-Critic-Pulp-%{version} %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} %check make test %files %license COPYING %doc Changes README %{perl_vendorlib}/Perl/ %{_mandir}/man3/Perl::Critic::Policy::CodeLayout::ProhibitFatCommaNewline.3* %{_mandir}/man3/Perl::Critic::Policy::CodeLayout::ProhibitIfIfSameLine.3* %{_mandir}/man3/Perl::Critic::Policy::CodeLayout::RequireFinalSemicolon.3* %{_mandir}/man3/Perl::Critic::Policy::CodeLayout::RequireTrailingCommaAtNewline.3* %{_mandir}/man3/Perl::Critic::Policy::Compatibility::ConstantLeadingUnderscore.3* %{_mandir}/man3/Perl::Critic::Policy::Compatibility::ConstantPragmaHash.3* %{_mandir}/man3/Perl::Critic::Policy::Compatibility::Gtk2Constants.3* %{_mandir}/man3/Perl::Critic::Policy::Compatibility::PerlMinimumVersionAndWhy.3* %{_mandir}/man3/Perl::Critic::Policy::Compatibility::PodMinimumVersion.3* %{_mandir}/man3/Perl::Critic::Policy::Compatibility::ProhibitUnixDevNull.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::ProhibitAdjacentLinks.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::ProhibitBadAproposMarkup.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::ProhibitDuplicateHeadings.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::ProhibitDuplicateSeeAlso.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::ProhibitLinkToSelf.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::ProhibitParagraphEndComma.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::ProhibitParagraphTwoDots.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::ProhibitUnbalancedParens.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::ProhibitVerbatimMarkup.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::RequireEndBeforeLastPod.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::RequireFilenameMarkup.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::RequireFinalCut.3* %{_mandir}/man3/Perl::Critic::Policy::Documentation::RequireLinkedURLs.3* %{_mandir}/man3/Perl::Critic::Policy::Miscellanea::TextDomainPlaceholders.3* %{_mandir}/man3/Perl::Critic::Policy::Miscellanea::TextDomainUnused.3* %{_mandir}/man3/Perl::Critic::Policy::Modules::ProhibitModuleShebang.3* %{_mandir}/man3/Perl::Critic::Policy::Modules::ProhibitPOSIXimport.3* %{_mandir}/man3/Perl::Critic::Policy::Modules::ProhibitUseQuotedVersion.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::ConstantBeforeLt.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::NotWithCompare.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::ProhibitArrayAssignAref.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::ProhibitBarewordDoubleColon.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::ProhibitDuplicateHashKeys.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyCommas.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::ProhibitFiletest_f.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::ProhibitNullStatements.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::ProhibitUnknownBackslash.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::RequireNumericVersion.3* %{_mandir}/man3/Perl::Critic::Policy::ValuesAndExpressions::UnexpandedSpecialLiteral.3* %{_mandir}/man3/Perl::Critic::Pulp.3* %{_mandir}/man3/Perl::Critic::Pulp::PodParser.3* %{_mandir}/man3/Perl::Critic::Pulp::Utils.3* %changelog * Wed May 10 2023 Paul Howarth - 99-7 - Use SPDX-format license tag * Sun Feb 28 2021 Paul Howarth - 99-1 - Update to 99 - RequireFinalSemicolon keep the "List" check for PPI 1.220 * Sat Feb 27 2021 Paul Howarth - 98-1 - Update to 98 - ProhibitUnknownBackslash: new charnames option - Always assume we have rpm ≥ 4.9 - Use %%license unconditionally * Sat Oct 19 2019 Paul Howarth - 97-1 - Update to 97 - RequireFinalSemicolon allow hashref in arrayref, which PPI 1.270 identifies as a code block (CPAN RT#130725) * Sun Jun 9 2019 Paul Howarth - 96-6 - Perl 5.30 rebuild * Tue Dec 26 2017 Paul Howarth - 96-1 - Update to 96 - ProhibitUnknownBackslash: allow for non-ascii in strings (CPAN RT#123922) * Mon Oct 9 2017 Paul Howarth - 95-1 - Update to 95 - RequireFinalSemicolon: sort{} blocks are expressions * Sat Jun 17 2017 Paul Howarth - 94-1 - Update to 94 - ProhibitUnknownBackslash \N also Perl 5.16 (CPAN RT#122064) * Fri Apr 14 2017 Paul Howarth - 93-1 - Update to 93 - Metadata changes only - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section * Sun Nov 27 2016 Paul Howarth - 92-1 - Update to 92 - ProhibitPOSIXimport oops, don't use // operator (CPAN RT#118959) * Fri Nov 25 2016 Paul Howarth - 91-1 - Update to 91 - RequireFinalCut allow no blank line before =cut (CPAN RT#118722) - RequireLinkedURLs allow example.com - Add patch for Perl 5.8 compatibility (CPAN RT#118959) * Thu Jul 28 2016 Paul Howarth - 90-5 - Fix FTBFS when perl is not in the minimal buildroot - Simplify find command using -delete - BR: perl-generators where available - Prefer %%global over %%define * Tue Jun 30 2015 Paul Howarth - 90-3 - Perl 5.22 rebuild * Sat Mar 7 2015 Paul Howarth - 90-1 - Update to 90 - PerlMinimumVersionAndWhy actually check Modern::Perl - ProhibitNullStatements beware of extra stuff after try/catch * Mon Jan 5 2015 Paul Howarth - 89-1 - Update to 89 - PerlMinimumVersionAndWhy experiment: Modern::Perl meaning 5.10 (CPAN RT#100290) - RequireFinalSemicolon recognise try/catch of Try.pm, TryCatch.pm and Syntax::Feature::Try (CPAN RT#100291) - Various List::Util functions as expression blocks - RequireTrailingCommaAtNewline exception for single here-documents (CPAN RT#100292) - ProhibitNullStatements report "null ;" on try/catch, and look inside try/catch/finally blocks * Sun Nov 23 2014 Paul Howarth - 88-1 - Update to 88 - ConstantBeforeLt oops again, PPI incompatibility too much, must depend on version 1.220 * Thu Nov 20 2014 Paul Howarth - 87-1 - Update to 87 - RequireFilenameMarkup - ConstantBeforeLt allow for PPI incompatible change to ->prototype() * Tue Sep 16 2014 Paul Howarth - 85-3 - Use %%license where possible * Thu May 8 2014 Paul Howarth - 85-1 - Update to 85 - Forgot Pod::Escapes in PREREQ_PM (CPAN RT#95440) * Wed May 7 2014 Paul Howarth - 84-1 - Update to 84 - New Documentation::RequireFilenameMarkup * Tue May 6 2014 Paul Howarth - 83-1 - Update to 83 - PerlMinimumVersionAndWhy new 5.10 -e -x stacked filetest (CPAN RT#95208) * Mon Apr 28 2014 Paul Howarth - 82-1 - Update to 82 - ProhibitAdjacentLinks, ProhibitLinkToSelf, ProhibitParagraphTwoDots, ProhibitUnbalancedParens, ProhibitVerbatimMarkup, RequireLinkedURLs check =begin blocks only for POD-type ":" - ProhibitBadAproposMarkup check =begin :man and :roff only - ProhibitDuplicateSeeAlso ignore all =begin blocks * Fri Apr 4 2014 Paul Howarth - 81-1 - Update to 81 - ProhibitAdjacentLinks: fix warnings when internal and external links adjacent (CPAN RT#94318) - ConstantPragmaHash and ConstantLeadingUnderscore pass ->content to version.pm as it enquires too much into a PPI object ref (CPAN RT#92100) - Drop %%defattr, redundant since rpm 4.4 * Sat Jul 27 2013 Paul Howarth - 80-1 - Update to 80 - New policy Documentation::ProhibitParagraphEndComma - Tests UnexpandedSpecialLiteral.t don't exercise __PACKAGE__ => across newline since that might be going to change in Perl 5.20 (CPAN RT#87307) * Wed Jul 24 2013 Paul Howarth - 79-2 - Perl 5.18 rebuild * Wed Mar 20 2013 Paul Howarth - 79-1 - Update to 79 - Fix ProhibitFatCommaNewline load version.pm for perl 5.8 (CPAN RT#83990) * Sat Mar 16 2013 Paul Howarth - 78-1 - Update to 78 - New policies CodeLayout::ProhibitIfIfSameLine, CodeLayout::ProhibitFatCommaNewline - Add patch to fix code with perl < 5.10 (CPAN RT#83990) * Thu Feb 28 2013 Paul Howarth - 77-1 - Update to 77 - New policy Documentation::ProhibitDuplicateHeadings - Fix POD parse losing violations across =cut gaps * Sat Jan 19 2013 Paul Howarth - 76-1 - Update to 76 - RequireNumericVersion explicit check for exponential strings, e.g. "1e6" * Sat Nov 24 2012 Paul Howarth - 75-1 - Update to 75 - ProhibitEmptyCommas fix for [{%%a},{}] (CPAN RT#81390) * Mon Oct 29 2012 Paul Howarth - 74-1 - Update to 74 - Skip version.pm 1e6 test in RequireNumericVersion.t for now * Thu Jun 28 2012 Paul Howarth - 73-1 - Update to 73 - Tests fix for File::Temp in perl pre-5.10 (CPAN RT#78053) - Drop patch for building with old File::Temp, no longer needed * Tue Jun 26 2012 Paul Howarth - 72-3 - Import from Fedora * Wed Jun 20 2012 Petr Pisar - 72-2 - Perl 5.16 rebuild * Tue Jun 19 2012 Petr Pisar - 72-1 - 72 bump * Wed Jun 06 2012 Petr Pisar - 71-1 - 71 bump * Fri May 18 2012 Petr Pisar - 70-1 - 70 bump * Mon Jan 30 2012 Petr Pisar - 69-1 - 69 bump * Fri Jan 27 2012 Petr Pisar - 68-1 - 68 bump * Fri Jan 13 2012 Fedora Release Engineering - 67-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Mon Dec 19 2011 Petr Pisar - 67-1 - 67 bump * Mon Dec 12 2011 Petr Pisar - 66-1 - 66 bump * Mon Sep 19 2011 Petr Pisar - 65-1 - 65 bump * Mon Aug 22 2011 Petr Pisar - 64-1 - 64 bump * Tue Jul 26 2011 Petr Pisar - 62-1 - 62 bump - Remove RPM 4.8 filters * Tue Jul 26 2011 Marcela Mašláňová - 61-3 - add RPM4.9 macro filter * Tue Jul 19 2011 Petr Sabata - 61-2 - Perl mass rebuild * Mon Jun 06 2011 Petr Pisar - 61-1 - Version 61 bump * Mon May 23 2011 Petr Pisar - 60-2 - Remove explicit defattr * Mon May 23 2011 Petr Pisar - 60-1 - Version 60 bump * Tue May 10 2011 Petr Pisar - 59-1 - Version 59 bump * Tue May 10 2011 Petr Pisar - 58-1 - Version 58 bump * Fri May 06 2011 Petr Pisar - 57-1 - Version 57 bump * Thu Apr 28 2011 Petr Pisar - 56-1 - Version 56 bump - Do not provide private parsers * Tue Apr 26 2011 Petr Pisar - 55-1 - Version 55 bump * Thu Apr 21 2011 Petr Pisar - 54-1 - 54 bump * Thu Apr 21 2011 Petr Pisar - 51-1 - Version 51 bump * Thu Apr 21 2011 Petr Pisar - 46-2 - Do not provide Perl::MinimumVersion * Tue Jan 25 2011 Petr Pisar 46-1 - Specfile autogenerated by cpanspec 1.78 - Remove BuidRoot stuff - Install into perl core direcotory - Make the package no-architecture depndend (the XS compilation is test-time)