| 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 |
|
|---|
| 35 | Name: perl-DBI
|
|---|
| 36 | Version: 1.641
|
|---|
| 37 | Release: 1%{?dist}
|
|---|
| 38 | Summary: A database access API for perl
|
|---|
| 39 | License: GPL+ or Artistic
|
|---|
| 40 | URL: http://dbi.perl.org/
|
|---|
| 41 | Source0: https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-%{version}.tar.gz
|
|---|
| 42 | BuildRequires: coreutils
|
|---|
| 43 | BuildRequires: findutils
|
|---|
| 44 | BuildRequires: gcc
|
|---|
| 45 | #BuildRequires: glibc-common
|
|---|
| 46 | BuildRequires: make
|
|---|
| 47 | BuildRequires: perl-devel
|
|---|
| 48 | BuildRequires: perl-generators
|
|---|
| 49 | #BuildRequires: perl-interpreter
|
|---|
| 50 | BuildRequires: perl(ExtUtils::MakeMaker) >= 6.63
|
|---|
| 51 | BuildRequires: perl(File::Find)
|
|---|
| 52 | BuildRequires: perl(strict)
|
|---|
| 53 | BuildRequires: sed
|
|---|
| 54 | # Run-time:
|
|---|
| 55 | BuildRequires: perl(base)
|
|---|
| 56 | BuildRequires: perl(constant)
|
|---|
| 57 | BuildRequires: perl(Carp)
|
|---|
| 58 | BuildRequires: 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
|
|---|
| 64 | BuildRequires: perl(Cwd)
|
|---|
| 65 | BuildRequires: perl(Data::Dumper)
|
|---|
| 66 | BuildRequires: perl(DynaLoader)
|
|---|
| 67 | BuildRequires: perl(Errno)
|
|---|
| 68 | BuildRequires: perl(Exporter)
|
|---|
| 69 | BuildRequires: perl(Fcntl)
|
|---|
| 70 | BuildRequires: perl(File::Basename)
|
|---|
| 71 | BuildRequires: perl(File::Spec)
|
|---|
| 72 | BuildRequires: perl(Getopt::Long)
|
|---|
| 73 | BuildRequires: perl(IO::Dir)
|
|---|
| 74 | BuildRequires: perl(IO::File)
|
|---|
| 75 | BuildRequires: perl(IO::Select)
|
|---|
| 76 | BuildRequires: perl(IPC::Open3)
|
|---|
| 77 | BuildRequires: perl(Math::BigInt)
|
|---|
| 78 | BuildRequires: perl(Scalar::Util)
|
|---|
| 79 | BuildRequires: perl(Storable)
|
|---|
| 80 | BuildRequires: perl(Symbol)
|
|---|
| 81 | BuildRequires: perl(threads)
|
|---|
| 82 | BuildRequires: perl(Tie::Hash)
|
|---|
| 83 | BuildRequires: perl(UNIVERSAL)
|
|---|
| 84 | BuildRequires: perl(utf8)
|
|---|
| 85 | BuildRequires: perl(vars)
|
|---|
| 86 | BuildRequires: perl(warnings)
|
|---|
| 87 | # Optional run-time:
|
|---|
| 88 | %if %{with perl_DBI_enables_Clone}
|
|---|
| 89 | BuildRequires: perl(Clone) >= 0.34
|
|---|
| 90 | %endif
|
|---|
| 91 | %if %{with perl_DBI_enables_DB_File}
|
|---|
| 92 | BuildRequires: perl(DB_File)
|
|---|
| 93 | %endif
|
|---|
| 94 | %if %{with perl_DBI_enables_MLDBM}
|
|---|
| 95 | BuildRequires: 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}
|
|---|
| 99 | BuildRequires: 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
|
|---|
| 116 | Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|---|
| 117 | %if %{with perl_DBI_enables_Clone}
|
|---|
| 118 | Suggests: perl(Clone) >= 0.34
|
|---|
| 119 | %endif
|
|---|
| 120 | %if %{with perl_DBI_enables_DB_File}
|
|---|
| 121 | Suggests: perl(DB_File)
|
|---|
| 122 | %endif
|
|---|
| 123 | Requires: perl(Math::BigInt)
|
|---|
| 124 | %if %{with perl_DBI_enables_MLDBM}
|
|---|
| 125 | Suggests: perl(MLDBM)
|
|---|
| 126 | %endif
|
|---|
| 127 | %if %{with perl_DBI_enables_SQL_Statement}
|
|---|
| 128 | Suggests: 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
|
|---|
| 136 | DBI is a database access Application Programming Interface (API) for
|
|---|
| 137 | the Perl Language. The DBI API Specification defines a set of
|
|---|
| 138 | functions, variables and conventions that provide a consistent
|
|---|
| 139 | database interface independent of the actual database being used.
|
|---|
| 140 |
|
|---|
| 141 | %if %{with perl_DBI_enables_coro}
|
|---|
| 142 | %package Coro
|
|---|
| 143 | Summary: Asynchronous DBD::Gofer stream transport using Coro
|
|---|
| 144 | Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|---|
| 145 |
|
|---|
| 146 | %description Coro
|
|---|
| 147 | This is an experimental asynchronous DBD::Gofer stream transport for DBI
|
|---|
| 148 | implemented on top of Coro. The BIG WIN from using Coro is that it enables
|
|---|
| 149 | the use of existing DBI frameworks like DBIx::Class.
|
|---|
| 150 | %endif
|
|---|
| 151 |
|
|---|
| 152 | %prep
|
|---|
| 153 | %setup -q -n DBI-%{version}
|
|---|
| 154 | for 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"
|
|---|
| 158 | done
|
|---|
| 159 | chmod 644 ex/*
|
|---|
| 160 | chmod 744 dbixs_rev.pl
|
|---|
| 161 | # Fix shell bangs
|
|---|
| 162 | for F in dbixs_rev.pl ex/corogofer.pl; do
|
|---|
| 163 | perl -MExtUtils::MakeMaker -e "ExtUtils::MM_Unix->fixin(q{$F})"
|
|---|
| 164 | done
|
|---|
| 165 | %if %{without perl_DBI_enables_coro}
|
|---|
| 166 | rm lib/DBD/Gofer/Transport/corostream.pm
|
|---|
| 167 | sed -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
|
|---|
| 171 | for 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
|
|---|
| 175 | done
|
|---|
| 176 | sed -i -e 's/"dbiproxy$ext_pl",//' Makefile.PL
|
|---|
| 177 | # Remove Win32 specific files to avoid unwanted dependencies
|
|---|
| 178 | for F in lib/DBI/W32ODBC.pm lib/Win32/DBIODBC.pm; do
|
|---|
| 179 | rm "$F"
|
|---|
| 180 | sed -i -e '\|^'"$F"'|d' MANIFEST
|
|---|
| 181 | done
|
|---|
| 182 |
|
|---|
| 183 | %build
|
|---|
| 184 | perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 OPTIMIZE="%{optflags}"
|
|---|
| 185 | make %{?_smp_mflags}
|
|---|
| 186 | make manifypods
|
|---|
| 187 |
|
|---|
| 188 | %install
|
|---|
| 189 | make pure_install DESTDIR=%{buildroot}
|
|---|
| 190 | find %{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
|
|---|