%global debug_package %{nil}
%global srcname LWP-Protocol-https

Name:		perl-LWP-Protocol-https
Summary:	Provides support for using https schemed URLs with LWP
Version:	6.10
Release:	1
License:	GPL-1.0-or-later or Artistic-1.0 or Artistic-1.0-Perl
URL:		https://metacpan.org/pod/LWP::Protocol::https
Source0:	https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-Protocol-https-%{version}.tar.gz

# These patches are from fedora: https://src.fedoraproject.org/rpms/perl-LWP-Protocol-https/tree/f29
Patch0:         LWP-Protocol-https-6.06-Debian-746576-don-t-disale-verification-if-only-host.patch
Patch1:         LWP-Protocol-https-6.06-Debian-746576-fix-test-make-it-workable-for-Crypt-SS.patch
BuildArch:      noarch
BuildRequires:	perl perl(Test::More) perl-generators perl(ExtUtils::MakeMaker)
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires:       perl(IO::Socket::SSL) >= 1.54
Requires:       perl(Mozilla::CA) >= 20110101
Requires:       perl(Net::HTTPS) >= 6

# Remove underspecified dependencies
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Net::HTTPS\\)\\s*$

%description
The LWP::Protocol::https module provides support for using https schemed URLs with LWP.\
This module is a plug-in to the LWP protocol handling, so you don't use it directly.\
Once the module is installed LWP is able to access sites using HTTP over SSL/TLS.\

%package	help
Summary:	Help manual for %{name}

%description    help
The %{name}-help package conatins man manual, CHANGELOG, README, etc

%prep
%autosetup -n %{srcname}-%{version} -p1

%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build

%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -delete
%{_fixperms} $RPM_BUILD_ROOT/*

%files
%{perl_vendorlib}/*

%files help
%license LICENSE
%doc Changes 
%{_mandir}/man3/*

%changelog
* Thu Jul 7 2022 liyanan <liyanan32@h-partners.com> - 6.10-1
- Update to 6.10

* Mon Aug 02 2021 chenyanpanHW <chenyanpan@huawei.com> - 6.07-8
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git

* Tue Nov 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 6.07-7
- Package init