]> git.pld-linux.org Git - packages/perl-CGI.git/blob - perl-CGI.spec
- up to 4.40
[packages/perl-CGI.git] / perl-CGI.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4
5 %define         pdir    CGI
6 %include        /usr/lib/rpm/macros.perl
7 Summary:        CGI Perl module - simple CGI interface class
8 Summary(pl.UTF-8):      Moduł Perla CGI - prosta klasa interfejsu do CGI
9 Name:           perl-CGI
10 Version:        4.40
11 Release:        1
12 Epoch:          1
13 # same as perl
14 License:        GPL or Artistic
15 Group:          Development/Languages/Perl
16 Source0:        http://search.cpan.org/CPAN/authors/id/L/LE/LEEJO/CGI-%{version}.tar.gz
17 # Source0-md5:  69880e2d59799851d939c4fbe5664901
18 URL:            http://search.cpan.org/dist/CGI/
19 BuildRequires:  perl-devel >= 1:5.8.1
20 BuildRequires:  rpm-perlprov >= 4.3-0.20030610.20.2
21 BuildRequires:  rpmbuild(macros) >= 1.654
22 BuildRequires:  sed >= 4.0
23 %if %{with tests}
24 BuildRequires:  perl(File::Spec) >= 0.82
25 BuildRequires:  perl-Encode
26 BuildRequires:  perl-FCGI >= 0.67
27 BuildRequires:  perl-HTML-Parser >= 3.69
28 BuildRequires:  perl-Test-Deep >= 0.11
29 BuildRequires:  perl-Test-NoWarnings >= 1.04
30 BuildRequires:  perl-Test-Simple >= 0.98
31 BuildRequires:  perl-Test-Warn >= 0.30
32 %endif
33 Requires:       perl(File::Spec) >= 0.82
34 Requires:       perl-HTML-Parser >= 3.69
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _noautoreq_perl FCGI
39
40 %description
41 CGI is an easy-to-use Perl5 library for writing World Wide Web CGI
42 scripts. This is replacement for usually outdated CGI module from perl
43 distribution.
44
45 %description -l pl.UTF-8
46 CGI jest modułem do prostego i szybkiego pisania aplikacji dla WWW -
47 skryptów CGI. Pakiet ten zawiera zamiennik dla zazwyczaj starej wersji
48 modułu CGI która jest dostarczana razem z perlem.
49
50 %package examples
51 Summary:        Examples for the CGI module
52 Summary(pl.UTF-8):      Przykłady użycia modułu CGI
53 Group:          Development/Languages/Perl
54 Requires:       %{name} = %{epoch}:%{version}-%{release}
55
56 %description examples
57 Examples for the CGI module.
58
59 %description examples -l pl.UTF-8
60 Przykłady użycia modułu CGI.
61
62 %prep
63 %setup -q -n %{pdir}-%{version}
64
65 %{__sed} -i -e 's|/usr/local/bin/perl|/usr/bin/perl|g' examples/*.{cgi,pl}
66
67 %build
68 %{__perl} Makefile.PL \
69         INSTALLDIRS=vendor
70 %{__make}
71
72 %{?with_tests:%{__make} test}
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT%{_examplesdir}
77
78 %{__make} install \
79         DESTDIR=$RPM_BUILD_ROOT
80
81 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
82
83 %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/CGI.pod \
84         $RPM_BUILD_ROOT%{perl_vendorlib}/CGI/HTML/Functions.pod
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files
90 %defattr(644,root,root,755)
91 %doc Changes README.md
92 %{perl_vendorlib}/CGI.pm
93 %{perl_vendorlib}/Fh.pm
94 %{perl_vendorlib}/CGI/*.pm
95 %{perl_vendorlib}/CGI/File
96 %{perl_vendorlib}/CGI/HTML
97 %{_mandir}/man3/CGI*.3pm*
98
99 %files examples
100 %defattr(644,root,root,755)
101 %dir %{_examplesdir}/%{name}-%{version}
102 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/*.cgi
103 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/*.pl
104 %{_examplesdir}/%{name}-%{version}/*.gif
This page took 0.043011 seconds and 4 git commands to generate.