]>
Commit | Line | Data |
---|---|---|
a58be506 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
c95e482d | 4 | |
a58be506 | 5 | %define pdir CGI |
6 | %define pnam PSGI | |
7 | %include /usr/lib/rpm/macros.perl | |
8 | Summary: CGI::PSGI - Adapt CGI.pm to the PSGI protocol | |
a58be506 | 9 | Name: perl-CGI-PSGI |
da003ed4 | 10 | Version: 0.15 |
a58be506 | 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 | |
da003ed4 | 16 | # Source0-md5: 58a39711add2b48229710688c5f81cfd |
c95e482d | 17 | URL: http://search.cpan.org/dist/CGI-PSGI/ |
a58be506 | 18 | BuildRequires: perl-devel >= 1:5.8.0 |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | %if %{with tests} | |
21 | %endif | |
22 | BuildArch: noarch | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
c95e482d ER |
26 | This module is for web application framework developers who currently |
27 | uses CGI to handle query parameters, and would like for the frameworks | |
28 | to comply with the PSGI protocol. | |
a58be506 | 29 | |
c95e482d ER |
30 | Only slight modifications should be required if the framework is |
31 | already collecting the body content to print to STDOUT at one place | |
32 | (rather using the print-as-you-go approach). | |
a58be506 | 33 | |
c95e482d ER |
34 | On the other hand, if you are an "end user" of CGI.pm and have a CGI |
35 | script that you want to run under PSGI web servers, this module might | |
36 | not be what you want. Take a look at CGI::Emulate::PSGI instead. | |
a58be506 | 37 | |
38 | Your application, typically the web application framework adapter | |
c95e482d ER |
39 | should update the code to do CGI::PSGI->new($env) instead of CGI->new |
40 | to create a new CGI object. (This is similar to how CGI::Fast object | |
41 | is initialized in a FastCGI environment.) | |
a58be506 | 42 | |
43 | %prep | |
44 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
45 | ||
46 | %build | |
47 | %{__perl} Makefile.PL \ | |
48 | INSTALLDIRS=vendor | |
49 | %{__make} | |
50 | ||
51 | %{?with_tests:%{__make} test} | |
52 | ||
53 | %install | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %{__make} pure_install \ | |
57 | DESTDIR=$RPM_BUILD_ROOT | |
58 | ||
59 | %clean | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %files | |
63 | %defattr(644,root,root,755) | |
64 | %doc Changes README | |
65 | %{perl_vendorlib}/CGI/*.pm | |
66 | %{_mandir}/man3/* |