| |
@@ -4,8 +4,8 @@
|
| |
%bcond_with perl_libwww_perl_enables_internet_test
|
| |
|
| |
Name: perl-libwww-perl
|
| |
- Version: 6.52
|
| |
- Release: 2%{?dist}
|
| |
+ Version: 6.53
|
| |
+ Release: 1%{?dist}
|
| |
Summary: A Perl interface to the World-Wide Web
|
| |
License: GPL+ or Artistic
|
| |
URL: https://metacpan.org/release/libwww-perl
|
| |
@@ -14,6 +14,7 @@
|
| |
Patch0: libwww-perl-6.39-Normalize-shebangs-in-examples.patch
|
| |
BuildArch: noarch
|
| |
BuildRequires: coreutils
|
| |
+ BuildRequires: findutils
|
| |
BuildRequires: make
|
| |
BuildRequires: perl-generators
|
| |
BuildRequires: perl-interpreter
|
| |
@@ -77,7 +78,7 @@
|
| |
BuildRequires: perl(File::Spec)
|
| |
BuildRequires: perl(File::Temp)
|
| |
BuildRequires: perl(FindBin)
|
| |
- BuildRequires: perl(HTTP::Daemon) >= 6
|
| |
+ BuildRequires: perl(HTTP::Daemon) >= 6.12
|
| |
BuildRequires: perl(Test::Fatal)
|
| |
BuildRequires: perl(Test::More) >= 0.96
|
| |
%if %{with perl_libwww_perl_enables_internet_test}
|
| |
@@ -128,6 +129,9 @@
|
| |
Provides: perl(LWP::Protocol::http::Socket) = %{version}
|
| |
Provides: perl(LWP::Protocol::http::SocketMethods) = %{version}
|
| |
|
| |
+ # Remove underspecified dependencies
|
| |
+ %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Authen::NTLM|Encode|File::Listing|HTTP::Cookies|HTTP::Daemon|HTTP::Date|HTTP::Negotiate|HTTP::Request|HTTP::Response|HTTP::Status|LWP::MediaTypes|MIME::Base64|Net::FTP|Net::HTTP|Test::More|URI|WWW::RobotRules)\\)$
|
| |
+
|
| |
%description
|
| |
The libwww-perl collection is a set of Perl modules which provides a simple and
|
| |
consistent application programming interface to the World-Wide Web. The main
|
| |
@@ -135,16 +139,37 @@
|
| |
write WWW clients. The library also contain modules that are of more general
|
| |
use and even classes that help you implement simple HTTP servers.
|
| |
|
| |
- # Remove underspecified dependencies
|
| |
- %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Authen::NTLM|Encode|File::Listing|HTTP::Date|HTTP::Negotiate|HTTP::Request|HTTP::Response|HTTP::Status|LWP::MediaTypes|MIME::Base64|Net::FTP|Net::HTTP|URI|WWW::RobotRules)\\)$
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl-Test-Harness
|
| |
+ Requires: perl(HTTP::Cookies) >= 6
|
| |
+ Requires: perl(HTTP::Daemon) >= 6.12
|
| |
+ Requires: perl(HTTP::Request) >= 6
|
| |
+ Requires: perl(HTTP::Response) >= 6
|
| |
+ Requires: perl(Net::HTTP) >= 6.18
|
| |
+ Requires: perl(Test::More) >= 0.96
|
| |
+ %if %{with perl_libwww_perl_enables_internet_test} && %{with perl_libwww_perl_enables_optional_test}
|
| |
+ Requires: perl(Test::LeakTrace)
|
| |
+ %endif
|
| |
+ Requires: perl(URI) >= 1.10
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
|
| |
%prep
|
| |
%setup -q -n libwww-perl-%{version}
|
| |
%patch0 -p1
|
| |
%if !%{with perl_libwww_perl_enables_internet_test}
|
| |
- rm t/leak/no_leak.t t/redirect.t
|
| |
- perl -i -ne 'print $_ unless m{^(?:t/leak/no_leak\.t|t/redirect\.t)}' MANIFEST
|
| |
+ rm t/base/protocols/nntp.t t/leak/no_leak.t t/redirect.t
|
| |
+ perl -i -ne 'print $_ unless m{^(?:t/base/protocols/nntp\.t|t/leak/no_leak\.t|t/redirect\.t)}' MANIFEST
|
| |
%endif
|
| |
+ # Help generators to recognize a Perl code
|
| |
+ for F in $(find t -name '*.t'); do
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*\bperl}{$Config{startperl}}' "$F"
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
|
| |
%build
|
| |
# Install the aliases by default
|
| |
@@ -154,6 +179,15 @@
|
| |
%install
|
| |
%{make_install}
|
| |
%{_fixperms} $RPM_BUILD_ROOT/*
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cp -a t %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
| |
+ #!/bin/bash
|
| |
+ unset COVERAGE PERL_LWP_ENV_HTTP_TEST_SERVER_TIMEOUT PERL_LWP_ENV_HTTP_TEST_URL
|
| |
+ cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" -r
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
|
| |
%check
|
| |
unset COVERAGE PERL_LWP_ENV_HTTP_TEST_SERVER_TIMEOUT PERL_LWP_ENV_HTTP_TEST_URL
|
| |
@@ -169,7 +203,14 @@
|
| |
%{_mandir}/man1/*.1*
|
| |
%{_mandir}/man3/*.3*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Mon Mar 08 2021 Petr Pisar <ppisar@redhat.com> - 6.53-1
|
| |
+ - 6.53 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.52-2
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
| |
|
| |