| |
@@ -1,6 +1,6 @@
|
| |
Name: perl-List-AllUtils
|
| |
Version: 0.19
|
| |
- Release: 1%{?dist}
|
| |
+ Release: 2%{?dist}
|
| |
Summary: Combines List::Util and List::SomeUtils
|
| |
# CODE_OF_CONDUCT.md: CC-BY
|
| |
# lib/List/AllUtils.pm: Artistic 2.0
|
| |
@@ -12,6 +12,7 @@
|
| |
BuildRequires: make
|
| |
BuildRequires: perl-generators
|
| |
BuildRequires: perl-interpreter
|
| |
+ BuildRequires: perl(Config)
|
| |
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
| |
BuildRequires: perl(strict)
|
| |
BuildRequires: perl(warnings)
|
| |
@@ -29,14 +30,42 @@
|
| |
BuildRequires: perl(Test::More) >= 0.96
|
| |
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
| |
|
| |
+ # Remove under-specified dependencies
|
| |
+ %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(List::Util\\) >= 1\.56$
|
| |
+ %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((Sub::Util|Test::More)\\)$
|
| |
+
|
| |
%description
|
| |
Are you sick of trying to remember whether a particular helper is defined
|
| |
in List::Util or List::SomeUtils? I sure am. Now you don't have to remember.
|
| |
This module will export all of the functions that either of those two
|
| |
modules defines.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl-Test-Harness
|
| |
+ Requires: perl(List::Util) >= 1.56
|
| |
+ Requires: perl(Sub::Util)
|
| |
+ Requires: perl(Test::More) >= 0.96
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
+
|
| |
%prep
|
| |
%setup -q -n List-AllUtils-%{version}
|
| |
+ for F in \
|
| |
+ t/00-report-prereqs.dd \
|
| |
+ t/00-report-prereqs.t \
|
| |
+ ; do
|
| |
+ rm "$F"
|
| |
+ perl -i -ne 'print $_ unless m{\A\Q'"$F"'\E}' MANIFEST
|
| |
+ done
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ for F in t/*.t; do
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
|
| |
%build
|
| |
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
| |
@@ -44,7 +73,15 @@
|
| |
|
| |
%install
|
| |
%{make_install}
|
| |
- %{_fixperms} $RPM_BUILD_ROOT/*
|
| |
+ %{_fixperms} %{buildroot}/*
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cp -a t %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
| |
+ #!/bin/sh
|
| |
+ cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
|
| |
%check
|
| |
make test
|
| |
@@ -55,7 +92,13 @@
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Mon Apr 26 2021 Michal Josef Špaček <mspacek@redhat.com> - 0.19-2
|
| |
+ - Package tests
|
| |
+
|
| |
* Mon Apr 26 2021 Michal Josef Špaček <mspacek@redhat.com> - 0.19-1
|
| |
- 0.19 bump
|
| |
|
| |