| |
@@ -1,6 +1,6 @@
|
| |
Name: perl-PAR-Dist
|
| |
- Version: 0.51
|
| |
- Release: 8%{?dist}
|
| |
+ Version: 0.52
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Toolkit for creating and manipulating Perl PAR distributions
|
| |
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
| |
URL: https://metacpan.org/release/PAR-Dist
|
| |
@@ -33,9 +33,6 @@
|
| |
# Tests:
|
| |
BuildRequires: perl(Test)
|
| |
BuildRequires: perl(Test::More)
|
| |
- # Optional tests:
|
| |
- BuildRequires: perl(Test::Pod) >= 1.00
|
| |
- BuildRequires: perl(Test::Pod::Coverage) >= 1.00
|
| |
Requires: perl(Archive::Zip)
|
| |
Requires: perl(Cwd)
|
| |
Requires: perl(ExtUtils::Install)
|
| |
@@ -55,19 +52,53 @@
|
| |
original CPAN distribution, and a MANIFEST detailing all files within it.
|
| |
Digitally signed PAR distributions will also contain a SIGNATURE file.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl-Test-Harness
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
+
|
| |
%prep
|
| |
%setup -q -n PAR-Dist-%{version}
|
| |
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ for F in t/*.t; do
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
+
|
| |
%build
|
| |
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
| |
%{make_build}
|
| |
|
| |
%install
|
| |
%{make_install}
|
| |
- %{_fixperms} $RPM_BUILD_ROOT/*
|
| |
+ %{_fixperms} %{buildroot}/*
|
| |
+
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cp -a t %{buildroot}%{_libexecdir}/%{name}
|
| |
+ rm %{buildroot}%{_libexecdir}/%{name}/t/00pod*
|
| |
+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
| |
+ #!/bin/bash
|
| |
+ set -e
|
| |
+ # Some tests write into temporary files/directories. The easiest solution
|
| |
+ # is to copy the tests into a writable directory and execute them from there.
|
| |
+ DIR=$(mktemp -d)
|
| |
+ pushd "$DIR"
|
| |
+ cp -a %{_libexecdir}/%{name}/* ./
|
| |
+ prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
| |
+ popd
|
| |
+ rm -rf "$DIR"
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
|
| |
%check
|
| |
- make test PERL_TEST_POD=1
|
| |
+ unset PERL_TEST_POD
|
| |
+ make test
|
| |
|
| |
%files
|
| |
%license LICENSE
|
| |
@@ -75,7 +106,14 @@
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Thu May 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 0.52-1
|
| |
+ - 0.52 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.51-8
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
| |
|
| |