]>
Commit | Line | Data |
---|---|---|
04ddbd07 AM |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir HTTP | |
6 | %define pnam Entity-Parser | |
04ddbd07 AM |
7 | Summary: HTTP::Entity::Parser - PSGI compliant HTTP Entity Parser |
8 | Name: perl-HTTP-Entity-Parser | |
9 | Version: 0.21 | |
10 | Release: 1 | |
11 | # same as perl | |
12 | License: GPL v1+ or Artistic | |
13 | Group: Development/Languages/Perl | |
14 | Source0: http://www.cpan.org/modules/by-module/HTTP/%{pdir}-%{pnam}-%{version}.tar.gz | |
15 | # Source0-md5: 50e8418bfe27ab26818ca6e264052c95 | |
16 | URL: http://search.cpan.org/dist/HTTP-Entity-Parser/ | |
17 | BuildRequires: perl-Module-Build | |
18 | BuildRequires: perl-Module-Build-Tiny | |
19 | BuildRequires: perl-devel >= 1:5.8.0 | |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
21 | %if %{with tests} | |
22 | BuildRequires: perl(HTTP::MultiPartParser) | |
23 | BuildRequires: perl(JSON::MaybeXS) >= 1.003007 | |
24 | BuildRequires: perl(WWW::Form::UrlEncoded) >= 0.23 | |
25 | BuildRequires: perl-HTTP-Message >= 6 | |
26 | BuildRequires: perl-Hash-MultiValue | |
27 | BuildRequires: perl-Stream-Buffered | |
28 | %endif | |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | HTTP::Entity::Parser is a PSGI-compliant HTTP Entity parser. This | |
34 | module also is compatible with HTTP::Body. Unlike HTTP::Body, | |
35 | HTTP::Entity::Parser reads HTTP entities from PSGI's environment | |
36 | $env->{'psgi.input'} and parses it. This module supports | |
37 | application/x-www-form-urlencoded, multipart/form-data and | |
38 | application/json. | |
39 | ||
40 | ||
41 | %prep | |
42 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
43 | ||
44 | %build | |
45 | %{__perl} Build.PL \ | |
46 | --destdir=$RPM_BUILD_ROOT \ | |
47 | --installdirs=vendor | |
48 | ./Build | |
49 | ||
50 | %{?with_tests:./Build test} | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | ./Build install \ | |
56 | destdir=$RPM_BUILD_ROOT | |
57 | ||
58 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
59 | cp -a eg $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %files | |
65 | %defattr(644,root,root,755) | |
66 | %doc Changes | |
67 | %dir %{perl_vendorlib}/HTTP/Entity | |
68 | %{perl_vendorlib}/HTTP/Entity/*.pm | |
69 | %{perl_vendorlib}/HTTP/Entity/Parser | |
70 | %{_mandir}/man3/HTTP::Entity::Parser*.3* | |
71 | %{_examplesdir}/%{name}-%{version} |