3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
7 %define pnam Async-HTTP-Server
8 Summary: Net::Async-HTTP-Server - serve HTTP with IO::Async
9 Name: perl-Net-Async-HTTP-Server
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: 4b13d36f2a309cde31df7c154aa3af46
17 URL: http://search.cpan.org/dist/Net-Async-HTTP-Server/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: perl-Test-Identity
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 This module allows a program to respond asynchronously to HTTP
28 requests, as part of a program based on IO::Async. An object in this
29 class listens on a single port and invokes the on_request callback or
30 subclass method whenever an HTTP request is received, allowing the
31 program to respond to it.
33 For accepting HTTP connections via PSGI and Plack, see also
34 Plack::Handler::Net::Async::HTTP::Server.
37 %setup -q -n %{pdir}-%{pnam}-%{version}
41 destdir=$RPM_BUILD_ROOT \
45 %{?with_tests:./Build test}
48 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
53 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
54 cp -a psgifiles $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
57 rm -rf $RPM_BUILD_ROOT
60 %defattr(644,root,root,755)
62 %{perl_vendorlib}/Net/Async/HTTP/Server.pm
63 %{perl_vendorlib}/Net/Async/HTTP/Server
64 %{perl_vendorlib}/Plack/Handler/Net/Async/HTTP/Server.pm
65 %{_mandir}/man3/Net::Async::HTTP::Server*.3pm*
66 %{_mandir}/man3/Plack::Handler::Net::Async::HTTP::Server*.3pm*
67 %{_examplesdir}/%{name}-%{version}