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

#
# spec file for package perl-Crypt-CBC
#
# Copyright (c) 2011 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 http://bugs.opensuse.org/
#

# norootforbuild

%bcond_with opt

Name:           perl-Crypt-CBC
%define cpan_name Crypt-CBC
Summary:        Encrypt Data with Cipher Block Chaining Mode
Version:        2.30
Release:        18
License:        Artistic-1.0
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/Crypt-CBC/
#Source:         http://www.cpan.org/authors/id/L/LD/LDS/Crypt-CBC-2.30.tar.gz
Source:         %{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
%if %{with opt}
BuildRequires:  perl(Crypt::Blowfish)
#BuildRequires:  perl(Crypt::Blowfish_PP)
BuildRequires:  perl(Crypt::CAST5)
BuildRequires:  perl(Crypt::DES)
BuildRequires:  perl(Crypt::DES_EDE3)
BuildRequires:  perl(Crypt::IDEA)
%endif
BuildRequires:  perl(Crypt::Rijndael)
BuildRequires:  perl(Digest::MD5) >= 2.00
Requires:       perl(Digest::MD5) >= 2.00
%if 0%{?suse_version} > 1010
Recommends:     perl(Crypt::Blowfish)
#Recommends:     perl(Crypt::Blowfish_PP)
Recommends:     perl(Crypt::CAST5)
Recommends:     perl(Crypt::DES)
Recommends:     perl(Crypt::DES_EDE3)
Recommends:     perl(Crypt::IDEA)
Recommends:     perl(Crypt::Rijndael)
%endif
%{perl_requires}

%description
This module is a Perl-only implementation of the cryptographic cipher block
chaining mode (CBC). In combination with a block cipher such as DES or
IDEA, you can encrypt and decrypt messages of arbitrarily long length. The
encrypted messages are compatible with the encryption format used by the
*OpenSSL* package.

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

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%clean
%{__rm} -rf %{buildroot}

%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README

%changelog
openSUSE Build Service is sponsored by