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