| |
@@ -6,8 +6,8 @@
|
| |
%endif
|
| |
|
| |
Name: perl-DB_File
|
| |
- Version: 1.855
|
| |
- Release: 478%{?dist}
|
| |
+ Version: 1.856
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Perl5 access to Berkeley DB version 1.x
|
| |
License: GPL+ or Artistic
|
| |
URL: https://metacpan.org/release/DB_File
|
| |
@@ -59,11 +59,27 @@
|
| |
will be limited to functionality provided by interface of version 1.x). The
|
| |
interface defined here mirrors the Berkeley DB interface closely.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl-Test-Harness
|
| |
+ Requires: perl(threads)
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
+
|
| |
%prep
|
| |
%setup -q -n DB_File-%{version}
|
| |
find -type f -exec chmod -x {} +
|
| |
perl -MConfig -pi -e 's|^#!.*perl|$Config{startperl}|' dbinfo
|
| |
|
| |
+ # 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 OPTIMIZE="$RPM_OPT_FLAGS"
|
| |
%{make_build}
|
| |
@@ -73,8 +89,21 @@
|
| |
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
|
| |
%{_fixperms} $RPM_BUILD_ROOT/*
|
| |
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cp -a t %{buildroot}%{_libexecdir}/%{name}
|
| |
+ # Remove author tests
|
| |
+ rm %{buildroot}%{_libexecdir}/%{name}/t/pod.t
|
| |
+ rm %{buildroot}%{_libexecdir}/%{name}/t/meta-*.t
|
| |
+ 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
|
| |
unset PERL_CORE
|
| |
+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
| |
make test
|
| |
|
| |
%files
|
| |
@@ -83,7 +112,14 @@
|
| |
%{perl_vendorarch}/DB_File*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Tue Jun 22 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.856-1
|
| |
+ - 1.856 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Mon May 24 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.855-478
|
| |
- Perl 5.34 re-rebuild of bootstrapped packages
|
| |
|
| |