diff --git a/Digest-SHA-6.02.tar.gz b/Digest-SHA-6.02.tar.gz deleted file mode 100644 index 2121827a25bb3952b446a19f1ddb5448e8f69ea7..0000000000000000000000000000000000000000 Binary files a/Digest-SHA-6.02.tar.gz and /dev/null differ diff --git a/Digest-SHA-6.03.tar.gz b/Digest-SHA-6.03.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..97e4113fa982b011ed33beea2006d5c86e344e43 Binary files /dev/null and b/Digest-SHA-6.03.tar.gz differ diff --git a/perl-Digest-SHA.spec b/perl-Digest-SHA.spec index f42f8740ed76b2756a56779e4a740cfd4a380610..a46e3eca165a29378848d047c069fbc1843db881 100644 --- a/perl-Digest-SHA.spec +++ b/perl-Digest-SHA.spec @@ -1,15 +1,13 @@ -%define anolis_release 2 -# Inherit additional methods from Digest::Base +%define anolis_release 1 %bcond_without perl_Digest_SHA_enables_digest_base -# Run optional test %bcond_without perl_Digest_SHA_enables_optional_test Name: perl-Digest-SHA Epoch: 2 -Version: 6.02 +Version: 6.03 Release: %{anolis_release}%{?dist} Summary: Perl extension for SHA-1/224/256/384/512 -License: GPL+ or Artistic +License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Digest-SHA Source0: https://cpan.metacpan.org/authors/id/M/MS/MSHELOR/Digest-SHA-%{version}.tar.gz # Since 5.80, upstream overrides CFLAGS because they think it improves @@ -29,6 +27,7 @@ BuildRequires: perl(strict) BuildRequires: perl(vars) # Run-time BuildRequires: perl(Carp) +BuildRequires: perl(Cwd) BuildRequires: perl(Exporter) BuildRequires: perl(Fcntl) # Getopt::Long not used at tests @@ -50,7 +49,6 @@ BuildRequires: perl(Test::Pod) >= 1.00 BuildRequires: perl(Test::Pod::Coverage) >= 0.08 %endif %endif -Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(Carp) # Optional but recommended %if %{with perl_Digest_SHA_enables_digest_base} @@ -67,12 +65,35 @@ gives Perl programmers a convenient way to calculate SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256 message digests. The module can handle all types of input, including partial-byte data. +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{EVR} +Requires: perl-Test-Harness + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + +%package doc +Summary: Doc files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +Doc files for %{name} + %prep %setup -q -n Digest-SHA-%{version} %patch0 -p1 chmod -x examples/* perl -MExtUtils::MakeMaker -e 'ExtUtils::MM_Unix->fixin(q{examples/dups})' +# 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 OPTIMIZE='%{optflags}' %{make_build} @@ -82,18 +103,42 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE='%{opt find '%{buildroot}' -type f -name '*.bs' -empty -delete %{_fixperms} -c '%{buildroot}' +# 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/podcover.t +# Create a temporary file in /tmp +perl -i -pe 's{"methods.tmp"}{"/tmp/methods.tmp"}' %{buildroot}%{_libexecdir}/%{name}/t/methods.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 +export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') make test %files -%doc Changes examples/ README +%doc examples/ %{_bindir}/shasum %{perl_vendorarch}/auto/Digest/ %{perl_vendorarch}/Digest/ %{_mandir}/man1/shasum.1* %{_mandir}/man3/Digest::SHA.3* +%files tests +%{_libexecdir}/%{name} + +%files doc +%doc Changes README + %changelog +* Tue Feb 07 2023 Chunmei Xu - 2:6.03-1 +- update to 6.03 + * Mon Jan 30 2023 Chunmei Xu - 2:6.02-2 - rebuild with perl 5.36.0