97 lines
3.8 KiB
RPMSpec
97 lines
3.8 KiB
RPMSpec
#
|
|
# spec file for package perl-Crypt-RIPEMD160
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name Crypt-RIPEMD160
|
|
Name: perl-Crypt-RIPEMD160
|
|
Version: 0.80.0
|
|
Release: 0
|
|
# 0.08 -> normalize -> 0.80.0
|
|
%define cpan_version 0.08
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Perl extension for the RIPEMD-160 Hash function
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/T/TO/TODDR/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
Provides: perl(Crypt::RIPEMD160) = %{version}
|
|
Provides: perl(Crypt::RIPEMD160::MAC) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
The *Crypt::RIPEMD160* module allows you to use the RIPEMD160 Message
|
|
Digest algorithm from within Perl programs.
|
|
|
|
The module is based on the implementation from Antoon Bosselaers from
|
|
Katholieke Universiteit Leuven.
|
|
|
|
A new RIPEMD160 context object is created with the *new* operation.
|
|
Multiple simultaneous digest contexts can be maintained, if desired. The
|
|
context is updated with the *add* operation which adds the strings
|
|
contained in the _LIST_ parameter. Note, however, that 'add('foo', 'bar')',
|
|
'add('foo')' followed by 'add('bar')' and 'add('foobar')' should all give
|
|
the same result.
|
|
|
|
The final message digest value is returned by the *digest* operation as a
|
|
20-byte binary string. This operation delivers the result of *add*
|
|
operations since the last *new* or *reset* operation. Note that the
|
|
*digest* operation is effectively a destructive, read-once operation. Once
|
|
it has been performed, the context must be *reset* before being used to
|
|
calculate another digest value.
|
|
|
|
Several convenience functions are also provided. The *addfile* operation
|
|
takes an open file-handle and reads it until end-of file in 8192 byte
|
|
blocks adding the contents to the context. The file-handle can either be
|
|
specified by name or passed as a type-glob reference, as shown in the
|
|
examples below. The *hexdigest* operation calls *digest* and returns the
|
|
result as a printable string of hexdecimal digits. This is exactly the same
|
|
operation as performed by the *unpack* operation in the examples below.
|
|
|
|
The *hash* operation can act as either a static member function (ie you
|
|
invoke it on the RIPEMD160 class as in the synopsis above) or as a normal
|
|
virtual function. In both cases it performs the complete RIPEMD160 cycle
|
|
(reset, add, digest) on the supplied scalar value. This is convenient for
|
|
handling small quantities of data. When invoked on the class a temporary
|
|
context is created. When invoked through an already created context object,
|
|
this context is used. The latter form is slightly more efficient. The
|
|
*hexhash* operation is analogous to *hexdigest*.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
|
%make_build
|
|
|
|
%check
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Changes CHGEUER.asc README
|
|
|
|
%changelog
|