source: spec/trunk/SPECS/perl-DBI.spec@ 1566

Last change on this file since 1566 was 1500, checked in by tellie, 7 years ago

spec: perl-DBI: Release version 1.641-1.

File size: 6.6 KB
Line 
1# According to documentation, module using Coro is just:
2# A PROOF-OF-CONCEPT IMPLEMENTATION FOR EXPERIMENTATION.
3# Omit Coro support on bootsrap bacause perl-DBI is pulled in by core
4# perl-CPANPLUS.
5%if %{defined perl_bootstrap} || 0%{?rhel} >= 7
6%bcond_with perl_DBI_enables_coro
7%else
8%bcond_without perl_DBI_enables_coro
9%endif
10
11%if 0%{?rhel}
12# Test with and suggest Clone Perl module for better multithreading
13%bcond_with perl_DBI_enables_Clone
14# Test with and suggest DB_File Perl module
15%bcond_with perl_DBI_enables_DB_File
16# Test with and suggest MLDBM Perl module for arbitrary mulicolumn databases
17%bcond_with perl_DBI_enables_MLDBM
18# Run optional tests
19%bcond_with perl_DBI_enables_optional_test
20%else
21%bcond_without perl_DBI_enables_Clone
22%bcond_without perl_DBI_enables_DB_File
23%bcond_without perl_DBI_enables_MLDBM
24%bcond_without perl_DBI_enables_optional_test
25%endif
26# Test with and suggest SQL::Statement Perl module for more serialization
27# formats
28# SQL::Statement is optional, and it is in build-cycle with DBI
29%if %{defined perl_bootstrap} || 0%{?rhel}
30%bcond_with perl_DBI_enables_SQL_Statement
31%else
32%bcond_without perl_DBI_enables_SQL_Statement
33%endif
34
35Name: perl-DBI
36Version: 1.641
37Release: 1%{?dist}
38Summary: A database access API for perl
39License: GPL+ or Artistic
40URL: http://dbi.perl.org/
41Source0: https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-%{version}.tar.gz
42BuildRequires: coreutils
43BuildRequires: findutils
44BuildRequires: gcc
45#BuildRequires: glibc-common
46BuildRequires: make
47BuildRequires: perl-devel
48BuildRequires: perl-generators
49#BuildRequires: perl-interpreter
50BuildRequires: perl(ExtUtils::MakeMaker) >= 6.63
51BuildRequires: perl(File::Find)
52BuildRequires: perl(strict)
53BuildRequires: sed
54# Run-time:
55BuildRequires: perl(base)
56BuildRequires: perl(constant)
57BuildRequires: perl(Carp)
58BuildRequires: perl(Config)
59%if %{with perl_DBI_enables_coro}
60# Coro Not needed by tests
61# Coro::Handle not needed by tests
62# Coro::Select not needed by tests
63%endif
64BuildRequires: perl(Cwd)
65BuildRequires: perl(Data::Dumper)
66BuildRequires: perl(DynaLoader)
67BuildRequires: perl(Errno)
68BuildRequires: perl(Exporter)
69BuildRequires: perl(Fcntl)
70BuildRequires: perl(File::Basename)
71BuildRequires: perl(File::Spec)
72BuildRequires: perl(Getopt::Long)
73BuildRequires: perl(IO::Dir)
74BuildRequires: perl(IO::File)
75BuildRequires: perl(IO::Select)
76BuildRequires: perl(IPC::Open3)
77BuildRequires: perl(Math::BigInt)
78BuildRequires: perl(Scalar::Util)
79BuildRequires: perl(Storable)
80BuildRequires: perl(Symbol)
81BuildRequires: perl(threads)
82BuildRequires: perl(Tie::Hash)
83BuildRequires: perl(UNIVERSAL)
84BuildRequires: perl(utf8)
85BuildRequires: perl(vars)
86BuildRequires: perl(warnings)
87# Optional run-time:
88%if %{with perl_DBI_enables_Clone}
89BuildRequires: perl(Clone) >= 0.34
90%endif
91%if %{with perl_DBI_enables_DB_File}
92BuildRequires: perl(DB_File)
93%endif
94%if %{with perl_DBI_enables_MLDBM}
95BuildRequires: perl(MLDBM)
96%endif
97# Do not build-require optional Params::Util to test the fall-back code
98%if %{with perl_DBI_enables_SQL_Statement}
99BuildRequires: perl(SQL::Statement) >= 1.402
100%endif
101# Tests
102#BuildRequires: perl(B)
103#BuildRequires: perl(Benchmark)
104#BuildRequires: perl(Encode)
105#BuildRequires: perl(File::Copy)
106#BuildRequires: perl(File::Path)
107#BuildRequires: perl(lib)
108#BuildRequires: perl(overload)
109#BuildRequires: perl(Test::More)
110#BuildRequires: perl(Test::Simple) >= 0.90
111#%if %{with perl_DBI_enables_optional_test}
112# Optional tests
113#BuildRequires: perl(Test::Pod) >= 1.00
114#BuildRequires: perl(Test::Pod::Coverage) >= 1.04
115#%endif
116Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
117%if %{with perl_DBI_enables_Clone}
118Suggests: perl(Clone) >= 0.34
119%endif
120%if %{with perl_DBI_enables_DB_File}
121Suggests: perl(DB_File)
122%endif
123Requires: perl(Math::BigInt)
124%if %{with perl_DBI_enables_MLDBM}
125Suggests: perl(MLDBM)
126%endif
127%if %{with perl_DBI_enables_SQL_Statement}
128Suggests: perl(SQL::Statement) >= 1.402
129%endif
130
131# Filter unwanted dependencies
132%{?perl_default_filter}
133%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(RPC::\\)
134
135%description
136DBI is a database access Application Programming Interface (API) for
137the Perl Language. The DBI API Specification defines a set of
138functions, variables and conventions that provide a consistent
139database interface independent of the actual database being used.
140
141%if %{with perl_DBI_enables_coro}
142%package Coro
143Summary: Asynchronous DBD::Gofer stream transport using Coro
144Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
145
146%description Coro
147This is an experimental asynchronous DBD::Gofer stream transport for DBI
148implemented on top of Coro. The BIG WIN from using Coro is that it enables
149the use of existing DBI frameworks like DBIx::Class.
150%endif
151
152%prep
153%setup -q -n DBI-%{version}
154for F in lib/DBD/Gofer.pm; do
155# iconv -f ISO-8859-1 -t UTF-8 < "$F" > "${F}.utf8"
156 touch -r "$F" "${F}.utf8"
157 mv "${F}.utf8" "$F"
158done
159chmod 644 ex/*
160chmod 744 dbixs_rev.pl
161# Fix shell bangs
162for F in dbixs_rev.pl ex/corogofer.pl; do
163 perl -MExtUtils::MakeMaker -e "ExtUtils::MM_Unix->fixin(q{$F})"
164done
165%if %{without perl_DBI_enables_coro}
166rm lib/DBD/Gofer/Transport/corostream.pm
167sed -i -e '/^lib\/DBD\/Gofer\/Transport\/corostream.pm$/d' MANIFEST
168%endif
169# Remove RPC::Pl* reverse dependencies due to security concerns,
170# CVE-2013-7284, bug #1051110
171for F in lib/Bundle/DBI.pm lib/DBD/Proxy.pm lib/DBI/ProxyServer.pm \
172 dbiproxy.PL t/80proxy.t; do
173 rm "$F"
174 sed -i -e '\|^'"$F"'|d' MANIFEST
175done
176sed -i -e 's/"dbiproxy$ext_pl",//' Makefile.PL
177# Remove Win32 specific files to avoid unwanted dependencies
178for F in lib/DBI/W32ODBC.pm lib/Win32/DBIODBC.pm; do
179 rm "$F"
180 sed -i -e '\|^'"$F"'|d' MANIFEST
181done
182
183%build
184perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 OPTIMIZE="%{optflags}"
185make %{?_smp_mflags}
186make manifypods
187
188%install
189make pure_install DESTDIR=%{buildroot}
190find %{buildroot} -type f -name '*.bs' -empty -delete
191%{_fixperms} '%{buildroot}'/*
192
193%check
194#make test
195
196%files
197# Changes already packaged as DBI::Changes
198%doc README.md ex/perl_dbi_nulls_test.pl ex/profile.pl
199%{_bindir}/dbipro*
200%{_bindir}/dbilogstrip
201%{perl_vendorarch}/*.p*
202%{perl_vendorarch}/DBD/
203%if %{with perl_DBI_enables_coro}
204%exclude %{perl_vendorarch}/DBD/Gofer/Transport/corostream.pm
205%endif
206%{perl_vendorarch}/DBI/
207%{perl_vendorarch}/auto/DBI/
208%{_mandir}/man1/*.1*
209%{_mandir}/man3/*.3*
210
211%if %{with perl_DBI_enables_coro}
212%files Coro
213%doc ex/corogofer.pl
214%{perl_vendorarch}/DBD/Gofer/Transport/corostream.pm
215%endif
216
217%changelog
218* Fri Sep 28 2018 Elbert Pol <elbert.pol@gmail.com> 1.641-1
219- First OS/2 rpm release
Note: See TracBrowser for help on using the repository browser.