| |
@@ -1,5 +1,5 @@
|
| |
Name: perl-HTTP-Daemon
|
| |
- Version: 6.13
|
| |
+ Version: 6.14
|
| |
Release: 1%{?dist}
|
| |
Summary: Simple HTTP server class
|
| |
License: GPL+ or Artistic
|
| |
@@ -8,11 +8,14 @@
|
| |
# Use Makefile.PL without unneeded dependencies
|
| |
Patch0: HTTP-Daemon-6.04-EU-MM-is-not-deprecated.patch
|
| |
BuildArch: noarch
|
| |
+ BuildRequires: coreutils
|
| |
BuildRequires: make
|
| |
+ BuildRequires: findutils
|
| |
BuildRequires: perl-generators
|
| |
BuildRequires: perl-interpreter
|
| |
BuildRequires: perl(:VERSION) >= 5.6
|
| |
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
| |
+ BuildRequires: perl(Module::Build::Tiny) >= 0.034
|
| |
BuildRequires: perl(strict)
|
| |
# Run-time:
|
| |
BuildRequires: perl(Carp)
|
| |
@@ -28,17 +31,16 @@
|
| |
BuildRequires: perl(Config)
|
| |
BuildRequires: perl(File::Spec)
|
| |
BuildRequires: perl(HTTP::Tiny) >= 0.042
|
| |
- # LWP::UserAgent not used
|
| |
+ BuildRequires: perl(LWP::RobotUA)
|
| |
+ BuildRequires: perl(LWP::UserAgent)
|
| |
BuildRequires: perl(Module::Metadata)
|
| |
- # Test not used if LWP::UserAgent is not installed
|
| |
+ BuildRequires: perl(Test)
|
| |
BuildRequires: perl(Test::More) >= 0.98
|
| |
BuildRequires: perl(Test::Needs)
|
| |
- # URI not used
|
| |
+ BuildRequires: perl(URI)
|
| |
# Optional tests:
|
| |
# CPAN::Meta not helpful
|
| |
# CPAN::Meta::Prereqs not helpful
|
| |
- # LWP::RobotUA not used
|
| |
- # LWP::UserAgent not used
|
| |
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
| |
Requires: perl(HTTP::Date) >= 6
|
| |
Requires: perl(HTTP::Request) >= 6
|
| |
@@ -56,9 +58,27 @@
|
| |
socket for incoming requests. The HTTP::Daemon is a subclass of
|
| |
IO::Socket::IP, so you can perform socket operations directly on it too.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl-Test-Harness
|
| |
+ # perl-generators doesn't detect 'use Test::Needs 'LWP::RobotUA';'
|
| |
+ Requires: perl(LWP::RobotUA)
|
| |
+ # perl-generators doesn't detect 'use Test::Needs 'LWP::UserAgent';'
|
| |
+ Requires: perl(LWP::UserAgent)
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
+
|
| |
%prep
|
| |
%setup -q -n HTTP-Daemon-%{version}
|
| |
%patch0 -p1
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ for F in $(find t/ -name '*.t'); do
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
|
| |
%build
|
| |
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
| |
@@ -66,12 +86,17 @@
|
| |
|
| |
%install
|
| |
%{make_install}
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cp -a t %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
| |
+ #!/bin/sh
|
| |
+ cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" -r
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
%{_fixperms} %{buildroot}/*
|
| |
|
| |
%check
|
| |
- # Some tests are skipped with "Can't talk to ourself (misconfigured system)".
|
| |
- # These tests actually are never run becuse the required CAN_TALK_TO_OURSELF
|
| |
- # file is never created. Those are author's tests.
|
| |
make test
|
| |
|
| |
%files
|
| |
@@ -80,7 +105,14 @@
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Fri Mar 04 2022 Michal Josef Špaček <mspacek@redhat.com> - 6.14-1
|
| |
+ - 6.14 bump
|
| |
+ - Package unit tests
|
| |
+
|
| |
* Thu Feb 10 2022 Michal Josef Špaček <mspacek@redhat.com> - 6.13-1
|
| |
- 6.13 bump
|
| |
|
| |
Upstream changes:
6.14 2022-03-03 20:47:51Z
- Test using loopback rather than internet accessible address (GH#52)
(Michal Josef Špaček)
- Use GH Perl helpers for build and coverage jobs (GH#53) (Olaf Alders)