| |
@@ -1,12 +1,13 @@
|
| |
Name: perl-ExtUtils-Manifest
|
| |
Epoch: 1
|
| |
- Version: 1.73
|
| |
- Release: 490%{?dist}
|
| |
+ Version: 1.75
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Utilities to write and check a MANIFEST file
|
| |
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
| |
URL: https://metacpan.org/release/ExtUtils-Manifest
|
| |
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/ExtUtils-Manifest-%{version}.tar.gz
|
| |
BuildArch: noarch
|
| |
+ BuildRequires: coreutils
|
| |
BuildRequires: make
|
| |
BuildRequires: perl-generators
|
| |
BuildRequires: perl-interpreter
|
| |
@@ -34,8 +35,22 @@
|
| |
%description
|
| |
%{summary}.
|
| |
|
| |
+ %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 ExtUtils-Manifest-%{version}
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ for F in `find t -name *.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
|
| |
@@ -43,18 +58,43 @@
|
| |
|
| |
%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/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
|
| |
+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
| |
make test
|
| |
|
| |
%files
|
| |
%license LICENSE
|
| |
%doc Changes README
|
| |
- %{perl_vendorlib}/*
|
| |
- %{_mandir}/man3/*
|
| |
+ %{perl_vendorlib}/ExtUtils*
|
| |
+ %{_mandir}/man3/ExtUtils*
|
| |
+
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
|
| |
%changelog
|
| |
+ * Tue May 02 2023 Jitka Plesnikova <jplesnik@redhat.com> - 1:1.75-1
|
| |
+ - 1.75 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.73-490
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
| |
|
| |