diff --git a/perl-Digest-SHA.spec b/perl-Digest-SHA.spec index a46e3eca165a29378848d047c069fbc1843db881..87d8894d8a485535dde7593edef50be6e5e64ee3 100644 --- a/perl-Digest-SHA.spec +++ b/perl-Digest-SHA.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %bcond_without perl_Digest_SHA_enables_digest_base %bcond_without perl_Digest_SHA_enables_optional_test @@ -10,60 +10,38 @@ Summary: Perl extension for SHA-1/224/256/384/512 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 -# performance. Revert it. Patch0: Digest-SHA-5.93-Reset-CFLAGS.patch -BuildRequires: coreutils -BuildRequires: findutils -BuildRequires: gcc -BuildRequires: make -BuildRequires: perl-devel -BuildRequires: perl-generators -BuildRequires: perl-interpreter -BuildRequires: perl(Config) -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 -BuildRequires: perl(Getopt::Std) -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 -BuildRequires: perl(integer) -BuildRequires: perl(warnings) -# XSLoader or DynaLoader -BuildRequires: perl(XSLoader) -# Optional run-time +BuildRequires: coreutils findutils gcc make +BuildRequires: perl-devel perl-generators perl-interpreter perl(Config) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 perl(Getopt::Std) +BuildRequires: perl(strict) perl(vars) perl(Carp) perl(Cwd) +BuildRequires: perl(Exporter) perl(Fcntl) perl(integer) perl(warnings) +BuildRequires: perl(XSLoader) perl(FileHandle) %if %{with perl_Digest_SHA_enables_digest_base} BuildRequires: perl(Digest::base) %endif -# Tests -BuildRequires: perl(FileHandle) %if %{with perl_Digest_SHA_enables_optional_test} -# Optional tests %if !%{defined perl_bootstrap} BuildRequires: perl(Test::More) BuildRequires: perl(Test::Pod) >= 1.00 BuildRequires: perl(Test::Pod::Coverage) >= 0.08 %endif %endif + +Requires: perl(XSLoader) Requires: perl(Carp) -# Optional but recommended %if %{with perl_Digest_SHA_enables_digest_base} Requires: perl(Digest::base) %endif -# XSLoader or DynaLoader -Requires: perl(XSLoader) %{?perl_default_filter} %description -Digest::SHA is a complete implementation of the NIST Secure Hash Standard. It -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. +Digest::SHA is a complete implementation of the NIST Secure Hash +Standard. It 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} @@ -71,8 +49,7 @@ Requires: %{name} = %{EVR} Requires: perl-Test-Harness %description tests -Tests from %{name}. Execute them -with "%{_libexecdir}/%{name}/test". +Tests from %{name}. Execute them with "%{_libexecdir}/%{name}/test". %package doc Summary: Doc files for %{name} @@ -83,12 +60,10 @@ BuildArch: noarch Doc files for %{name} %prep -%setup -q -n Digest-SHA-%{version} -%patch0 -p1 +%autosetup -p1 -n Digest-SHA-%{version} 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" @@ -106,10 +81,8 @@ find '%{buildroot}' -type f -name '*.bs' -empty -delete # 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 @@ -133,9 +106,12 @@ make test %{_libexecdir}/%{name} %files doc -%doc Changes README +%doc Changes README %changelog +* Tue Apr 11 2023 Kaihao Bai - 2:6.03-2 +- optimize spec + * Tue Feb 07 2023 Chunmei Xu - 2:6.03-1 - update to 6.03