File perl-Crypt-PasswdMD5.spec of Package perl-Crypt-PasswdMD5

# spec file for package perl-Crypt-PasswdMD5
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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

Name:           perl-Crypt-PasswdMD5
Version:        1.40
Release:        0
%define cpan_name Crypt-PasswdMD5
Summary:        Provide interoperable MD5-based crypt() functions
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Digest::MD5) >= 2.53
BuildRequires:  perl(Module::Build)
BuildRequires:  perl(Test::More) >= 0.94
#BuildRequires: perl(Crypt::PasswdMD5)
Requires:       perl(Digest::MD5) >= 2.53

'apache_md5_crypt()' provides a function compatible with Apache's
'.htpasswd' files. This was contributed by Bryan Hart <>. This
function is exported by default.

The 'unix_md5_crypt()' provides a crypt()-compatible interface to the
rather new MD5-based crypt() function found in modern operating systems.
It's based on the implementation found on FreeBSD 2.2.[56]-RELEASE. This
function is also exported by default.

For both functions, if a salt value is not supplied, a random salt will be
generated, using the function random_md5_salt(). This function is not
exported by default.

%setup -q -n %{cpan_name}-%{version}

%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}

./Build test

./Build install destdir=%{buildroot} create_packlist=0

%files -f %{name}.files
%doc Changelog.ini Changes README xt