%define real_name Net-SSLeay

Summary: Perl module for using OpenSSL via Network
Summary(ja): OpenSSL を Network にて用いる為の perl モジュール
Name: perl-Net-SSLeay
Version: 1.90
Release: 1%{?_dist_release}
Group: programming
Vendor: Project Vine
Distribution: Vine Linux

License: Artistic
URL: https://metacpan.org/dist/Net-SSLeay/view/lib/Net/SSLeay.pod
Source0: https://cpan.metacpan.org/authors/id/C/CH/CHRISN/%{real_name}-%{version}.tar.gz
Patch1: Net-SSLeay-1.90-OpenSSL3.patch
Patch2: Net-SSLeay-1.90-pkgconfig.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: perl, openssl-devel >= 1.1.1
BuildRequires: zlib-devel
Requires: perl, openssl >= 1.1.1

Obsoletes: perl-Net_SSLeay < 1.64
Provides: perl-Net_SSLeay = %{version}-%{release}

%description
Perl module for using OpenSSL via Network, Net::SSLeay.

%description -l ja
OpenSSL を Network にて用いる為の perl モジュール, Net::SSLeay


%debug_package


%prep
%setup -q -n %{real_name}-%{version}
# Fixes from upstream for OpenSSL 3.0.0
%patch1 -p1
# Get libraries to link against from pkg-config
# https://github.com/radiator-software/p5-net-ssleay/pull/127
%patch2

# Fix permissions in examples to avoid bogus doc-file dependencies
chmod -c 644 examples/*


%build
unset OPENSSL_PREFIX
PERL_MM_USE_DEFAULT=1 perl Makefile.PL \
	INSTALLDIRS=vendor \
	NO_PACKLIST=1 \
	NO_PERLLOCAL=1 \
	OPTIMIZE="%{optflags}" < /dev/null
%{make_build}


%install
rm -rf %{buildroot}
%{make_install}
find %{buildroot} -type f -name '*.bs' -empty -delete

# Remove script we don't want packaged
rm -f %{buildroot}%{perl_vendorarch}/Net/ptrtstrun.pl


%clean 
rm -rf %{buildroot}


%check
unset RELEASE_TESTING
make test


%files
%defattr(-,root,root)
%license LICENSE
%doc Changes Credits QuickRef README perllocal.pod
%{perl_vendorarch}/auto/Net/
%dir %{perl_vendorarch}/Net/
%{perl_vendorarch}/Net/SSLeay/
%{perl_vendorarch}/Net/SSLeay.pm
%doc %{perl_vendorarch}/Net/SSLeay.pod
%{_mandir}/man3/Net::SSLeay.3*
%{_mandir}/man3/Net::SSLeay::Handle.3*


%changelog
* Tue Nov 16 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.90-1
- new upstream release.
- rebuilt with perl-5.34.0.
- imported Patch1-2 from rawhide.

* Fri May 17 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.88-1
- new upstream release.
- rebuilt with perl-5.26.

* Sun Nov 18 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.85-1
- new upstream release.

* Mon May  9 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.74-1
- new upstream release.

* Mon Jun 30 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.64-1
- new upstream release.
- renamed from "perl-Net_SSLeay".
- added "Obsoletes: perl-Net_SSLeay" and "Provides: perl-Net_SSLeay".

* Sun Feb 26 2012 Yasumichi Akahoshi <yasumichi@vinelinux.org> 1.42-1
- new upstream release

* Sat Apr 30 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.36-2
- rebuild with perl-5.12.3

* Sun Feb 06 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.36-1
- new upstream release
- change BuildRequires: openssl-devel instead of openssl
- add BuildRequires: zlib-devel

* Wed Jul  8 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.35-1
- new upstream release

* Wed Apr 08 2009 Shu KONNO <owa@bg.wakwak.com> 1.30-2
- spec in utf-8

* Tue Apr 29 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.30-1
- rebuilt with perl-5.10.0
- applied new versioning policy

* Sun Jun  3 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.30-0vl2
- rebuilt with openssl-0.9.8e

* Mon Dec 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.30-0vl1
- updated to 1.30

* Sat Sep  9 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.25-0vl4
- installed files to vendor_perl
- changed Group to Development/Libraries

* Mon Nov 29 2004 IWAI, Masaharu <iwai@alib.jp> 1.25-0vl3
- build on perl-5.8.6-0vl1

* Wed Dec 10 2003 IWAI, Masaharu <iwai@alib.jp> 1.25-0vl2
- build with perl-5.8.2
- add %%{perl_sitearch}/{Net,Net/SSLeay} directories in %%files

* Thu Nov 06 2003 Satoshi MACHINO <machino@vinelinux.org> 1.25-0vl1
- new upstream version
- built on perl-5.8.1

* Thu May 08 2003 Tomoya TAKA <taka@vinelinux.org> 1.22-0vl5
- fixed install man dir, again

* Tue May 06 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 1.22-0vl4
- fixed install dir of perllocal.pod

* Mon May 05 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 1.22-0vl3
- fixed install man dir

* Thu May 01 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 1.22-0vl2
- comment out "make test"

* Thu May 01 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 1.22-0vl1
- updated to 1.22

* Fri Feb 15 2002 Toru Sagami <sagami@vinelinux.org> 1.13-0vl1
- updated to 1.13
- BuildPreReq/Requires: perl, openssl-0.9.6b
- rewrite a better spec with License/Group

* Mon Jul 16 2001 <sagami@vinelinux.org>
- 1.07-0vl3: rebuilt with openssl-0.9.6b
- erase unneeeded files from %%doc
- use _prefix, not prefix

* Thu Jul 05 2001 <sagami@vinelinux.org>
- 1.07-0vl2: built with perl-5.6.1

* Thu Jun  7 2001 Yasuhide OMORI <omori@m-t.com>
- 1.07

* Fri Sep 1 2000 Yoshishiro Kajiki <kajiki@ylug.org>
- first version of rpm.
