diff --git a/Test-POE-Server-TCP-1.20.tar.gz b/Test-POE-Server-TCP-1.20.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..77a26195e4e0f9391bb1ab07fc919b8a42b192b2 Binary files /dev/null and b/Test-POE-Server-TCP-1.20.tar.gz differ diff --git a/perl-Test-POE-Server-TCP.spec b/perl-Test-POE-Server-TCP.spec new file mode 100644 index 0000000000000000000000000000000000000000..06414128931b1e95dd5d13e591ff1351b4138085 --- /dev/null +++ b/perl-Test-POE-Server-TCP.spec @@ -0,0 +1,78 @@ +Name: perl-Test-POE-Server-TCP +Version: 1.20 +Release: 1 +Summary: POE Component providing TCP server services for test cases +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/release/Test-POE-Server-TCP +Source0: https://cpan.metacpan.org/authors/id/B/BI/BINGOS/Test-POE-Server-TCP-%{version}.tar.gz +BuildArch: noarch +BuildRequires: make +BuildRequires: perl-interpreter >= 1:5.6.0 +BuildRequires: perl-generators +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(POE) >= 1.004 +BuildRequires: perl(POE::Filter::Line) +BuildRequires: perl(POE::Wheel::ReadWrite) +BuildRequires: perl(POE::Wheel::SocketFactory) +BuildRequires: perl(Test::More) >= 0.47 +BuildRequires: perl(blib) +# Missed by the automatic perl dependancy generator. +Requires: perl(POE) >= 1.004 +Requires: perl(POE::Filter::Line) +Requires: perl(POE::Wheel::ReadWrite) +Requires: perl(POE::Wheel::SocketFactory) + +%description +Test::POE::Server::TCP is a POE component that provides a TCP server +framework for inclusion in client component test cases, instead of having +to roll your own. + +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + +%prep +%setup -q -n Test-POE-Server-TCP-%{version} +# 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 +%{make_build} + +%install +%{make_install} +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +rm -f %{buildroot}%{_libexecdir}/%{name}/t/author* +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 +make test + +%files +%license LICENSE +%doc Changes examples LICENSE README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%files tests +%{_libexecdir}/%{name} + +%changelog +* Mon Apr 01 2024 konglidong - 1.20-1 +- package init diff --git a/perl-Test-POE-Server-TCP.yaml b/perl-Test-POE-Server-TCP.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6a3d2ca372b4e4d57420eca5d44e5899014bcfe5 --- /dev/null +++ b/perl-Test-POE-Server-TCP.yaml @@ -0,0 +1,4 @@ +version_control: metacpan +src_repo: Test-POE-Server-TCP +tag_prefix: "" +separator: "."