]> git.pld-linux.org Git - packages/perl-CGI.git/blob - perl-CGI.spec
update test BR, use _noautoreq_perl
[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.13
11 Release:        1
12 Epoch:          1
13 # same as perl
14 License:        GPL or Artistic
15 Group:          Development/Languages/Perl
16 Source0:        https://github.com/leejo/CGI.pm/archive/v%{version}.tar.gz
17 # Source0-md5:  48ed1e50f34e32de6787bffe129ff71b
18 URL:            http://search.cpan.org/dist/CGI.pm/
19 BuildRequires:  perl-devel >= 1:5.8.0
20 BuildRequires:  rpm-perlprov >= 4.3-0.20030610.20.2
21 BuildRequires:  sed >= 4.0
22 BuildRequires:    rpmbuild(macros) >= 1.654
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
28 BuildRequires:  perl-Test-Deep
29 BuildRequires:  perl-Test-NoWarnings
30 BuildRequires:  perl-Test-Simple >= 0.98
31 BuildRequires:  perl-Test-Warn
32 %endif
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %define         _noautoreq_perl FCGI
37
38 %description
39 CGI is an easy-to-use Perl5 library for writing World Wide Web CGI
40 scripts. This is replacement for usually outdated CGI module from perl
41 distribution.
42
43 %description -l pl.UTF-8
44 CGI jest modułem do prostego i szybkiego pisania aplikacji dla WWW -
45 skryptów CGI. Pakiet ten zawiera zamiennik dla zazwyczaj starej wersji
46 modułu CGI która jest dostarczana razem z perlem.
47
48 %package examples
49 Summary:        Examples for the CGI module
50 Summary(pl.UTF-8):      Przykłady użycia modułu CGI
51 Group:          Development/Languages/Perl
52 Requires:       %{name} = %{epoch}:%{version}-%{release}
53
54 %description examples
55 Examples for the CGI module.
56
57 %description examples -l pl.UTF-8
58 Przykłady użycia modułu CGI.
59
60 %prep
61 %setup -q -n %{pdir}.pm-%{version}
62
63 %{__sed} -i -e 's|/usr/local/bin/perl|/usr/bin/perl|g' examples/*.{cgi,pl}
64
65 %build
66 %{__perl} Makefile.PL \
67         INSTALLDIRS=vendor
68 %{__make}
69
70 %{?with_tests:%{__make} test}
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT%{_examplesdir}
75
76 %{__make} install \
77         DESTDIR=$RPM_BUILD_ROOT
78
79 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %files
85 %defattr(644,root,root,755)
86 %doc Changes README.md
87 %{perl_vendorlib}/CGI.pm
88 %{perl_vendorlib}/Fh.pm
89 %{perl_vendorlib}/CGI/*.pm
90 %{perl_vendorlib}/CGI/File
91 %{_mandir}/man3/CGI*.3pm*
92
93 %files examples
94 %defattr(644,root,root,755)
95 %dir %{_examplesdir}/%{name}-%{version}
96 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/*.cgi
97 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/*.pl
98 %{_examplesdir}/%{name}-%{version}/*.gif
99 %{_examplesdir}/%{name}-%{version}/*.html
100 %{_examplesdir}/%{name}-%{version}/*.xbm
101 %{_examplesdir}/%{name}-%{version}/WORLD_WRITABLE
This page took 0.031394 seconds and 4 git commands to generate.