]>
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 | |
7 | %include /usr/lib/rpm/macros.perl | |
8 | Summary: CGI::Parse::PSGI - Parses CGI output and creates PSGI response out of it | |
cf49b4dc | 9 | Name: perl-CGI-Emulate-PSGI |
adb8d075 | 10 | Version: 0.15 |
cf49b4dc | 11 | Release: 1 |
12 | # same as perl | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/CGI/%{pdir}-%{pnam}-%{version}.tar.gz | |
adb8d075 | 16 | # Source0-md5: 3f0b6ae68d1e84e66ea8eb629e569284 |
0ff044d6 | 17 | URL: http://search.cpan.org/dist/CGI-Emulate-PSGI/ |
cf49b4dc | 18 | BuildRequires: perl-devel >= 1:5.8.0 |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | %if %{with tests} | |
21 | BuildRequires: perl-HTTP-Message | |
22 | %endif | |
23 | BuildArch: noarch | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
0ff044d6 | 27 | use CGI::Parse::PSGI qw(parse_cgi_output); |
cf49b4dc | 28 | |
0ff044d6 | 29 | my $output = YourApp->run; my $psgi_res = parse_cgi_output(\$output); |
cf49b4dc | 30 | |
31 | %prep | |
32 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
33 | ||
34 | %build | |
35 | %{__perl} Makefile.PL \ | |
36 | INSTALLDIRS=vendor | |
37 | %{__make} | |
38 | ||
39 | %{?with_tests:%{__make} test} | |
40 | ||
41 | %install | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | ||
44 | %{__make} pure_install \ | |
45 | DESTDIR=$RPM_BUILD_ROOT | |
46 | ||
47 | %clean | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
50 | %files | |
51 | %defattr(644,root,root,755) | |
52 | %doc Changes README | |
f459fb04 | 53 | %dir %{perl_vendorlib}/CGI/Emulate |
cf49b4dc | 54 | %{perl_vendorlib}/CGI/Emulate/*.pm |
f459fb04 AM |
55 | %dir %{perl_vendorlib}/CGI/Parse |
56 | %{perl_vendorlib}/CGI/Parse/PSGI.pm | |
cf49b4dc | 57 | %{_mandir}/man3/* |