From 5c250281b9c403ebc76e1b170686c157ff433ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 10 Jan 2022 15:46:36 +0100 Subject: [PATCH] Modernize a spec file --- .rpmlint | 2 -- perl-Syntax-Keyword-Junction.rpmlintrc | 1 + perl-Syntax-Keyword-Junction.spec | 37 +++++++++++++++++++------- 3 files changed, 28 insertions(+), 12 deletions(-) delete mode 100644 .rpmlint create mode 100644 perl-Syntax-Keyword-Junction.rpmlintrc diff --git a/.rpmlint b/.rpmlint deleted file mode 100644 index 6b7c9f7..0000000 --- a/.rpmlint +++ /dev/null @@ -1,2 +0,0 @@ -from Config import * -addFilter("spelling-error .* (dev|exe|html|http)"); diff --git a/perl-Syntax-Keyword-Junction.rpmlintrc b/perl-Syntax-Keyword-Junction.rpmlintrc new file mode 100644 index 0000000..92349a9 --- /dev/null +++ b/perl-Syntax-Keyword-Junction.rpmlintrc @@ -0,0 +1 @@ +addFilter('spelling-error .* (dev|exe|html|http)') diff --git a/perl-Syntax-Keyword-Junction.spec b/perl-Syntax-Keyword-Junction.spec index 1fb85ca..7778e65 100644 --- a/perl-Syntax-Keyword-Junction.spec +++ b/perl-Syntax-Keyword-Junction.spec @@ -1,15 +1,19 @@ +# Perform optional tests +%bcond_without perl_Syntax_Keyword_Junction_enables_optional_test + Name: perl-Syntax-Keyword-Junction Version: 0.003008 -Release: 21%{?dist} +Release: 22%{?dist} Summary: Perl6 style Junction operators in Perl5 License: GPL+ or Artistic URL: https://metacpan.org/release/Syntax-Keyword-Junction Source0: https://cpan.metacpan.org/authors/id/F/FR/FREW/Syntax-Keyword-Junction-%{version}.tar.gz BuildArch: noarch -BuildRequires: make -BuildRequires: perl-interpreter +BuildRequires: coreutils +BuildRequires: make BuildRequires: perl-generators -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30 +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(strict) BuildRequires: perl(warnings) # Run-time: @@ -20,9 +24,11 @@ BuildRequires: perl(Sub::Exporter::Progressive) >= 0.001006 # Tests: BuildRequires: perl(Test::More) >= 0.88 BuildRequires: perl(Test::Requires) >= 0.07 -BuildRequires: perl(syntax) +%if %{with perl_Syntax_Keyword_Junction_enables_optional_test} # Optional tests: BuildRequires: perl(Sub::Exporter) >= 0.986 +BuildRequires: perl(syntax) +%endif Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(if) Requires: perl(overload) @@ -38,25 +44,36 @@ commonly used being any and all. Inspired by the Perl6 design docs, %prep %setup -q -n Syntax-Keyword-Junction-%{version} +for F in t/release-pod-syntax.t \ +%if %{without perl_Syntax_Keyword_Junction_enables_optional_test} + t/smartmatch.t t/syntax.t \ +%endif +; do + rm "$F" + perl -i -ne 'print $_ unless m{^\E'"$F"'\Q}' MANIFEST +done %build -perl Makefile.PL INSTALLDIRS=vendor -make %{?_smp_mflags} +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 +%{make_build} %install -make pure_install DESTDIR=$RPM_BUILD_ROOT -find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +%{make_install} %{_fixperms} $RPM_BUILD_ROOT/* %check make test %files -%doc Changes LICENSE README +%license LICENSE +%doc Changes README %{perl_vendorlib}/* %{_mandir}/man3/* %changelog +* Mon Jan 10 2022 Petr Pisar - 0.003008-22 +- Modernize a spec file + * Thu Jul 22 2021 Fedora Release Engineering - 0.003008-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild