# According to documentation, module using Coro is just: # A PROOF-OF-CONCEPT IMPLEMENTATION FOR EXPERIMENTATION. # Omit Coro support on bootsrap bacause perl-DBI is pulled in by core # perl-CPANPLUS. %if %{defined perl_bootstrap} || 0%{?rhel} >= 7 %bcond_with perl_DBI_enables_coro %else %bcond_without perl_DBI_enables_coro %endif %if 0%{?rhel} # Test with and suggest Clone Perl module for better multithreading %bcond_with perl_DBI_enables_Clone # Test with and suggest DB_File Perl module %bcond_with perl_DBI_enables_DB_File # Test with and suggest MLDBM Perl module for arbitrary mulicolumn databases %bcond_with perl_DBI_enables_MLDBM # Run optional tests %bcond_with perl_DBI_enables_optional_test %else %bcond_without perl_DBI_enables_Clone %bcond_without perl_DBI_enables_DB_File %bcond_without perl_DBI_enables_MLDBM %bcond_without perl_DBI_enables_optional_test %endif # Test with and suggest SQL::Statement Perl module for more serialization # formats # SQL::Statement is optional, and it is in build-cycle with DBI %if %{defined perl_bootstrap} || 0%{?rhel} %bcond_with perl_DBI_enables_SQL_Statement %else %bcond_without perl_DBI_enables_SQL_Statement %endif Name: perl-DBI Version: 1.641 Release: 1%{?dist} Summary: A database access API for perl License: GPL+ or Artistic URL: http://dbi.perl.org/ Source0: https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-%{version}.tar.gz BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc #BuildRequires: glibc-common BuildRequires: make BuildRequires: perl-devel BuildRequires: perl-generators #BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) >= 6.63 BuildRequires: perl(File::Find) BuildRequires: perl(strict) BuildRequires: sed # Run-time: BuildRequires: perl(base) BuildRequires: perl(constant) BuildRequires: perl(Carp) BuildRequires: perl(Config) %if %{with perl_DBI_enables_coro} # Coro Not needed by tests # Coro::Handle not needed by tests # Coro::Select not needed by tests %endif BuildRequires: perl(Cwd) BuildRequires: perl(Data::Dumper) BuildRequires: perl(DynaLoader) BuildRequires: perl(Errno) BuildRequires: perl(Exporter) BuildRequires: perl(Fcntl) BuildRequires: perl(File::Basename) BuildRequires: perl(File::Spec) BuildRequires: perl(Getopt::Long) BuildRequires: perl(IO::Dir) BuildRequires: perl(IO::File) BuildRequires: perl(IO::Select) BuildRequires: perl(IPC::Open3) BuildRequires: perl(Math::BigInt) BuildRequires: perl(Scalar::Util) BuildRequires: perl(Storable) BuildRequires: perl(Symbol) BuildRequires: perl(threads) BuildRequires: perl(Tie::Hash) BuildRequires: perl(UNIVERSAL) BuildRequires: perl(utf8) BuildRequires: perl(vars) BuildRequires: perl(warnings) # Optional run-time: %if %{with perl_DBI_enables_Clone} BuildRequires: perl(Clone) >= 0.34 %endif %if %{with perl_DBI_enables_DB_File} BuildRequires: perl(DB_File) %endif %if %{with perl_DBI_enables_MLDBM} BuildRequires: perl(MLDBM) %endif # Do not build-require optional Params::Util to test the fall-back code %if %{with perl_DBI_enables_SQL_Statement} BuildRequires: perl(SQL::Statement) >= 1.402 %endif # Tests #BuildRequires: perl(B) #BuildRequires: perl(Benchmark) #BuildRequires: perl(Encode) #BuildRequires: perl(File::Copy) #BuildRequires: perl(File::Path) #BuildRequires: perl(lib) #BuildRequires: perl(overload) #BuildRequires: perl(Test::More) #BuildRequires: perl(Test::Simple) >= 0.90 #%if %{with perl_DBI_enables_optional_test} # Optional tests #BuildRequires: perl(Test::Pod) >= 1.00 #BuildRequires: perl(Test::Pod::Coverage) >= 1.04 #%endif Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %if %{with perl_DBI_enables_Clone} Suggests: perl(Clone) >= 0.34 %endif %if %{with perl_DBI_enables_DB_File} Suggests: perl(DB_File) %endif Requires: perl(Math::BigInt) %if %{with perl_DBI_enables_MLDBM} Suggests: perl(MLDBM) %endif %if %{with perl_DBI_enables_SQL_Statement} Suggests: perl(SQL::Statement) >= 1.402 %endif # Filter unwanted dependencies %{?perl_default_filter} %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(RPC::\\) %description DBI is a database access Application Programming Interface (API) for the Perl Language. The DBI API Specification defines a set of functions, variables and conventions that provide a consistent database interface independent of the actual database being used. %if %{with perl_DBI_enables_coro} %package Coro Summary: Asynchronous DBD::Gofer stream transport using Coro Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description Coro This is an experimental asynchronous DBD::Gofer stream transport for DBI implemented on top of Coro. The BIG WIN from using Coro is that it enables the use of existing DBI frameworks like DBIx::Class. %endif %prep %setup -q -n DBI-%{version} for F in lib/DBD/Gofer.pm; do # iconv -f ISO-8859-1 -t UTF-8 < "$F" > "${F}.utf8" touch -r "$F" "${F}.utf8" mv "${F}.utf8" "$F" done chmod 644 ex/* chmod 744 dbixs_rev.pl # Fix shell bangs for F in dbixs_rev.pl ex/corogofer.pl; do perl -MExtUtils::MakeMaker -e "ExtUtils::MM_Unix->fixin(q{$F})" done %if %{without perl_DBI_enables_coro} rm lib/DBD/Gofer/Transport/corostream.pm sed -i -e '/^lib\/DBD\/Gofer\/Transport\/corostream.pm$/d' MANIFEST %endif # Remove RPC::Pl* reverse dependencies due to security concerns, # CVE-2013-7284, bug #1051110 for F in lib/Bundle/DBI.pm lib/DBD/Proxy.pm lib/DBI/ProxyServer.pm \ dbiproxy.PL t/80proxy.t; do rm "$F" sed -i -e '\|^'"$F"'|d' MANIFEST done sed -i -e 's/"dbiproxy$ext_pl",//' Makefile.PL # Remove Win32 specific files to avoid unwanted dependencies for F in lib/DBI/W32ODBC.pm lib/Win32/DBIODBC.pm; do rm "$F" sed -i -e '\|^'"$F"'|d' MANIFEST done %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 OPTIMIZE="%{optflags}" make %{?_smp_mflags} make manifypods %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name '*.bs' -empty -delete %{_fixperms} '%{buildroot}'/* %check #make test %files # Changes already packaged as DBI::Changes %doc README.md ex/perl_dbi_nulls_test.pl ex/profile.pl %{_bindir}/dbipro* %{_bindir}/dbilogstrip %{perl_vendorarch}/*.p* %{perl_vendorarch}/DBD/ %if %{with perl_DBI_enables_coro} %exclude %{perl_vendorarch}/DBD/Gofer/Transport/corostream.pm %endif %{perl_vendorarch}/DBI/ %{perl_vendorarch}/auto/DBI/ %{_mandir}/man1/*.1* %{_mandir}/man3/*.3* %if %{with perl_DBI_enables_coro} %files Coro %doc ex/corogofer.pl %{perl_vendorarch}/DBD/Gofer/Transport/corostream.pm %endif %changelog * Fri Sep 28 2018 Elbert Pol 1.641-1 - First OS/2 rpm release