| |
@@ -1,6 +1,6 @@
|
| |
Name: perl-CPAN-Perl-Releases
|
| |
- Version: 5.20210123
|
| |
- Release: 2%{?dist}
|
| |
+ Version: 5.20210220
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Mapping Perl releases on CPAN to the location of the tarballs
|
| |
License: GPL+ or Artistic
|
| |
URL: https://metacpan.org/release/CPAN-Perl-Releases
|
| |
@@ -32,18 +32,54 @@
|
| |
releases that have been uploaded to CPAN to the authors/id/ path that the
|
| |
tarballs reside in.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl-Test-Harness
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}-%{version}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
+
|
| |
%prep
|
| |
%setup -q -n CPAN-Perl-Releases-%{version}
|
| |
|
| |
+ # Help file to recognise the Perl scripts and normalize shebangs
|
| |
+ for F in `find t -name *.t`; do
|
| |
+ if head -1 "$F" | grep -q -e '^#!.*perl' ; then
|
| |
+ perl -MConfig -pi -e 's|^#!.*perl\b|$Config{startperl}|' "$F"
|
| |
+ else
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F"
|
| |
+ fi
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
+
|
| |
+ # Remove author tests
|
| |
+ rm t/author-pod-coverage.t t/author-pod-syntax.t
|
| |
+ perl -i -ne 'print $_ unless m{^t/author-pod-coverage\.t}' MANIFEST
|
| |
+ perl -i -ne 'print $_ unless m{^t/author-pod-syntax\.t}' MANIFEST
|
| |
+
|
| |
+
|
| |
%build
|
| |
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
| |
%{make_build}
|
| |
|
| |
%install
|
| |
%{make_install}
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}/%{_libexecdir}/%{name}
|
| |
+ cp -a t %{buildroot}/%{_libexecdir}/%{name}
|
| |
+ cat > %{buildroot}/%{_libexecdir}/%{name}/test << 'EOF'
|
| |
+ #!/bin/sh
|
| |
+ unset AUTHOR_TESTING
|
| |
+ cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}/%{_libexecdir}/%{name}/test
|
| |
%{_fixperms} %{buildroot}/*
|
| |
|
| |
%check
|
| |
+ unset AUTHOR_TESTING
|
| |
+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
| |
make test
|
| |
|
| |
%files
|
| |
@@ -52,7 +88,14 @@
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Mon Feb 22 2021 Jitka Plesnikova <jplesnik@redhat.com> - 5.20210220-1
|
| |
+ - 5.20210220 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.20210123-2
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
| |
|
| |