Modernize spec

- Modernize spec using %{make_build} and %{make_install}
- Runtime openssl dependency should be on openssl-libs
- Always require preferred IPv6 back-end: IO::Socket::IP ≥ 0.31
- Always require preferred IDN back-end: URI::_idna
This commit is contained in:
Paul Howarth 2019-06-27 12:30:15 +01:00
parent 030559c4b0
commit d7c2f49e0f

View File

@ -1,6 +1,6 @@
Name: perl-IO-Socket-SSL
Version: 2.066
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Perl library for transparent SSL
License: (GPL+ or Artistic) and MPLv2.0
URL: https://metacpan.org/release/IO-Socket-SSL
@ -13,13 +13,12 @@ Patch2: IO-Socket-SSL-2.066-Test-client-performs-Post-Handshake-Authentication.
BuildArch: noarch
# Module Build
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
# Module Runtime
BuildRequires: openssl >= 0.9.8
BuildRequires: openssl-libs >= 0.9.8
BuildRequires: perl(Carp)
BuildRequires: perl(Config)
BuildRequires: perl(constant)
@ -27,49 +26,39 @@ BuildRequires: perl(Errno)
BuildRequires: perl(Exporter)
BuildRequires: perl(HTTP::Tiny)
BuildRequires: perl(IO::Socket)
BuildRequires: perl(IO::Socket::INET6) >= 2.62
BuildRequires: perl(IO::Socket::INET)
BuildRequires: perl(IO::Socket::IP) >= 0.31
BuildRequires: perl(Net::SSLeay) >= 1.46
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(Socket)
BuildRequires: perl(Socket6)
BuildRequires: perl(Socket) >= 1.95
BuildRequires: perl(strict)
BuildRequires: perl(URI::_idna)
BuildRequires: perl(vars)
BuildRequires: perl(warnings)
# Test Suite
# openssl tool required for Test-client-performs-Post-Handshake-Authentication.patch
BuildRequires: openssl
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(File::Temp)
BuildRequires: perl(FindBin)
BuildRequires: perl(IO::Select)
BuildRequires: perl(IO::Socket::INET)
BuildRequires: perl(IO::Socket::INET6) >= 2.62
# IPC::Run for Test-client-performs-Post-Handshake-Authentication.patch
BuildRequires: perl(IPC::Run)
BuildRequires: perl(Net::IDN::Encode)
BuildRequires: perl(Net::LibIDN)
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(utf8)
BuildRequires: procps
# Runtime
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: openssl >= 0.9.8
Requires: openssl-libs >= 0.9.8
Requires: perl(Config)
Requires: perl(HTTP::Tiny)
# Use IO::Socket::IP for IPv6 support where available, else IO::Socket::INET6
%if 0%{?fedora} > 15 || 0%{?rhel} > 6
BuildRequires: perl(IO::Socket::IP) >= 0.20, perl(Socket) >= 1.95
Requires: perl(IO::Socket::IP) >= 0.20, perl(Socket) >= 1.95
%else
Requires: perl(IO::Socket::INET6) >= 2.62, perl(Socket6)
%endif
# IDN back-ends: URI::_idna (from URI ≥ 1.50) is preferred
# but Net::IDN::Encode (next pref) and Net::LibIDN are also tested
BuildRequires: perl(Net::IDN::Encode)
BuildRequires: perl(Net::LibIDN)
%if 0%{?fedora:1} || 0%{?rhel} > 6
BuildRequires: perl(URI::_idna)
Requires: perl(IO::Socket::INET)
Requires: perl(IO::Socket::IP) >= 0.31
Requires: perl(Socket) >= 1.95
Requires: perl(URI::_idna)
%else
Requires: perl(Net::IDN::Encode)
%endif
%description
This module is a true drop-in replacement for IO::Socket::INET that
@ -95,12 +84,14 @@ mod_perl.
%patch2 -p1
%build
NO_NETWORK_TESTING=1 perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
NO_NETWORK_TESTING=1 perl Makefile.PL \
INSTALLDIRS=vendor \
NO_PACKLIST=1 \
NO_PERLLOCAL=1
%{make_build}
%install
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -delete
%{make_install}
%{_fixperms} -c %{buildroot}
%check
@ -124,6 +115,12 @@ make test
%{_mandir}/man3/IO::Socket::SSL::PublicSuffix.3*
%changelog
* Thu Jun 27 2019 Paul Howarth <paul@city-fan.org> - 2.066-5
- Runtime openssl dependency should be on openssl-libs
- Always require preferred IPv6 back-end: IO::Socket::IP 0.31
- Always require preferred IDN back-end: URI::_idna
- Modernize spec using %%{make_build} and %%{make_install}
* Wed Jun 26 2019 Paul Howarth <paul@city-fan.org> - 2.066-4
- PublicSuffix.pm is licensed MPLv2.0 (#1724169)