]>
Commit | Line | Data |
---|---|---|
cf49b4dc | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
0ff044d6 | 4 | |
cf49b4dc | 5 | %define pdir CGI |
6 | %define pnam Emulate-PSGI | |
cf49b4dc | 7 | Summary: CGI::Parse::PSGI - Parses CGI output and creates PSGI response out of it |
cf49b4dc | 8 | Name: perl-CGI-Emulate-PSGI |
e6846d5e | 9 | Version: 0.23 |
cf49b4dc | 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/CGI/%{pdir}-%{pnam}-%{version}.tar.gz | |
e6846d5e | 15 | # Source0-md5: 6986c3d32a3347a1f0e9ce7e7c54f046 |
0ff044d6 | 16 | URL: http://search.cpan.org/dist/CGI-Emulate-PSGI/ |
cf49b4dc | 17 | BuildRequires: perl-devel >= 1:5.8.0 |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
19 | %if %{with tests} | |
20 | BuildRequires: perl-HTTP-Message | |
21 | %endif | |
22 | BuildArch: noarch | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
0ff044d6 | 26 | use CGI::Parse::PSGI qw(parse_cgi_output); |
cf49b4dc | 27 | |
0ff044d6 | 28 | my $output = YourApp->run; my $psgi_res = parse_cgi_output(\$output); |
cf49b4dc | 29 | |
30 | %prep | |
31 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
32 | ||
33 | %build | |
34 | %{__perl} Makefile.PL \ | |
35 | INSTALLDIRS=vendor | |
36 | %{__make} | |
37 | ||
38 | %{?with_tests:%{__make} test} | |
39 | ||
40 | %install | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | ||
43 | %{__make} pure_install \ | |
44 | DESTDIR=$RPM_BUILD_ROOT | |
45 | ||
46 | %clean | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | ||
49 | %files | |
50 | %defattr(644,root,root,755) | |
51 | %doc Changes README | |
f459fb04 | 52 | %dir %{perl_vendorlib}/CGI/Emulate |
cf49b4dc | 53 | %{perl_vendorlib}/CGI/Emulate/*.pm |
f459fb04 AM |
54 | %dir %{perl_vendorlib}/CGI/Parse |
55 | %{perl_vendorlib}/CGI/Parse/PSGI.pm | |
cf49b4dc | 56 | %{_mandir}/man3/* |