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

# spec file for package perl-Net-SSLeay
# Copyright (c) 2017 SUSE LINUX 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

%bcond_with test

Name:           perl-Net-SSLeay
Version:        1.81
Release:        0
%define cpan_name Net-SSLeay
Summary:        Perl extension for using OpenSSL
License:        Artistic-2.0
Group:          Development/Libraries/Perl
BuildRequires:  libopenssl-devel
BuildRequires:  openssl
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %{with test}
BuildRequires:  perl(Test::Exception)
BuildRequires:  perl(Test::NoWarnings)
BuildRequires:  perl(Test::Pod) >= 1.00
BuildRequires:  perl(Test::Pod::Coverage)
BuildRequires:  perl(Test::Warn)

Net::SSLeay module contains perl bindings to openssl ( library.
Net::SSLeay module basically comprise of:
    High level functions for accessing web servers (by using HTTP/HTTPS)
    Low level API (mostly mapped 1:1 to openssl's C functions)
    Convenience functions (related to low level API but with more perl friendly interface)

%setup -q -n %{cpan_name}-%{version}
# replace rest of /usr/local/bin/perl with /usr/bin/perl
for f in $(find . -type f -exec grep -l "/usr/local/bin/perl" {} \; ); do
  sed -i -e "s@/usr/local/bin/perl@perl@g" $f
# delete .orig files created by patches
find . -type f -name "*.orig" -delete 
# fix perm
pushd examples
chmod 0644 *.pl

perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags} -Wall" < /dev/null
make %{?_smp_mflags}

%if ! 0%{?qemu_user_space_build}
make test


rm -rf %{buildroot}

%files -f %{name}.files
%doc Changes Credits LICENSE QuickRef README examples

openSUSE Build Service is sponsored by