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

#
# spec file for package perl-Crypt-SSLeay (Version 0.58)
#
# Copyright (c) 2010 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


Name:           perl-Crypt-SSLeay
%define cpan_name Crypt-SSLeay
Summary:        OpenSSL support for LWP
Version:        0.58
Release:        2
License:        GPL+ or Artistic
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/Crypt-SSLeay/
#Source:         http://www.cpan.org/authors/id/N/NA/NANIS/Crypt-SSLeay-0.58.tar.gz
Source:         %{cpan_name}-%{version}.tar.bz2
Patch:          %{cpan_name}-0.58.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(MIME::Base64)
BuildRequires:  openssl-devel
#
Requires:       perl(MIME::Base64)
Requires:       openssl

%description
This Perl module provides support for the HTTPS protocol under LWP, to
allow an 'LWP::UserAgent' object to perform GET, HEAD and POST requests.
Please see LWP for more information on POST requests.

The 'Crypt::SSLeay' package provides 'Net::SSL', which is loaded by
'LWP::Protocol::https' for https requests and provides the necessary SSL
glue.

This distribution also makes following deprecated modules available:

    Crypt::SSLeay::CTX
    Crypt::SSLeay::Conn
    Crypt::SSLeay::X509

Work on Crypt::SSLeay has been continued only to provide https support for
the LWP (libwww-perl) libraries.

Authors:
--------
    This module was originally written by Gisle Aas, and was subsequently
    maintained by Joshua Chamas, David Landgren, brian d foy and Sinan Unur.

%prep
%setup -q -n %{cpan_name}-%{version}
%patch -p1
### rpmlint
# wrong-file-end-of-line-encoding
%{__perl} -pi -e 's|\r\n|\n|' README

%build
export CRYPT_SSLEAY_DEFAULT=/usr
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
### since 11.4 perl_process_packlist
### removes .packlist, perllocal.pod files
%if 0%{?suse_version} > 1130
%perl_process_packlist
%else
# do not perl_process_packlist
# remove .packlist file
%{__rm} -f $RPM_BUILD_ROOT%perl_vendorarch/auto/Crypt/SSLeay/.packlist
# remove perllocal.pod file
%{__rm} -f $RPM_BUILD_ROOT%perl_archlib/perllocal.pod
%endif
%perl_gen_filelist

%clean
%{__rm} -rf $RPM_BUILD_ROOT

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

%changelog
openSUSE Build Service is sponsored by