Files
perl-HTTP-Proxy/perl-HTTP-Proxy.spec

66 lines
2.2 KiB
RPMSpec

# vim: set sw=4 ts=4 et nu:
# norootforbuild
Name: perl-HTTP-Proxy
Version: 0.24
Release: 0
Summary: A pure Perl HTTP proxy
Source: http://search.cpan.org/CPAN/authors/id/B/BO/BOOK/HTTP-Proxy-%{version}.tar.gz
URL: http://search.cpan.org/dist/HTTP-Proxy
Group: Development/Libraries/Perl
License: Perl License
BuildRoot: %{_tmppath}/build-%{name}-%{version}
Requires: perl = %{perl_version}
BuildRequires: perl
BuildRequires: perl(Module::Build)
BuildRequires: perl(Test::More)
BuildRequires: perl(LWP::UserAgent) >= 2
BuildRequires: perl(HTTP::Daemon) >= 1.25
Requires: perl(Test::More)
Requires: perl(LWP::UserAgent) >= 2
Requires: perl(HTTP::Daemon) >= 1.25
%description
This module implements a HTTP proxy, using a HTTP::Daemon to accept client
connections, and a LWP::UserAgent to ask for the requested pages.
The most interesting feature of this proxy object is its ability to filter
the HTTP requests and responses through user-defined filters.
Once the proxy is created, with the "new()" method, it is possible to
alter its behaviour by adding so-called "filters". This is done by the
"push_filter()" method. Once the filter is ready to run, it can be
launched, with the "start()" method. This method does not normally return
until the proxy is killed or otherwise stopped.
An important thing to note is that the proxy is (except when running the
"NoFork" engine) a *forking* proxy: it doesn't support passing information
between child processes, and you can count on reliable information passing
only during a single HTTP connection (request + response).
%prep
%setup -q -n "HTTP-Proxy-%{version}"
%build
%__perl ./Build.PL
./Build
%install
./Build pure_install --destdir "%{buildroot}" --installdirs vendor
%perl_process_packlist
%check
./Build test
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc Changes README
%dir %{perl_vendorlib}/HTTP
%{perl_vendorlib}/HTTP/Proxy.pm
%{perl_vendorlib}/HTTP/Proxy
%dir %{perl_vendorarch}/auto/HTTP
%{perl_vendorarch}/auto/HTTP/Proxy
%doc %{perl_man3dir}/HTTP::Proxy.%{perl_man3ext}%{ext_man}
%doc %{perl_man3dir}/HTTP::Proxy::*.%{perl_man3ext}%{ext_man}