| |
@@ -1,6 +1,6 @@
|
| |
Name: perl-experimental
|
| |
- Version: 0.022
|
| |
- Release: 4%{?dist}
|
| |
+ Version: 0.024
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Experimental features made easy
|
| |
License: GPL+ or Artistic
|
| |
URL: https://metacpan.org/release/experimental
|
| |
@@ -27,9 +27,24 @@
|
| |
This pragma provides an easy and convenient way to enable or disable
|
| |
experimental features.
|
| |
|
| |
+ %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 experimental-%{version}
|
| |
|
| |
+ # Help file to recognise the 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}
|
| |
@@ -38,7 +53,17 @@
|
| |
%{make_install}
|
| |
%{_fixperms} $RPM_BUILD_ROOT/*
|
| |
|
| |
+ # 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
|
| |
+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
| |
make test
|
| |
|
| |
%files
|
| |
@@ -47,7 +72,14 @@
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Mon May 03 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.024-1
|
| |
+ - 0.024 bump
|
| |
+ - Package test
|
| |
+
|
| |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.022-4
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
| |
|
| |