Name:           perl-DBD-SQLite
Version:        1.58
Release:        5
Summary:        DBD::SQLite embeds SQLite database engine into a DBD driver
License:        (GPL+ or Artistic) and Public Domain
URL:            https://metacpan.org/release/DBD-SQLite
Source0:        https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/DBD-SQLite-%{version}.tar.gz

Patch0:         0000-perl-DBD-SQLite-bz543982.patch
Patch1:         0001-DBD-SQLite-1.50-Remove-bundled-source-extentions.patch
Patch2:         0002-DBD-SQLite-1.58-Unbundle-Test-NoWarnings.patch

Patch6000:      6000-Handle-unknown-op-in-DBD-SQLite-VirtualTable-PerlDat.patch
Patch6001:      6001-added-a-boilerplace-for-test.patch
Patch6002:      6002-fixed-for-older-DBI.patch

BuildRequires:  sqlite-devel coreutils findutils
BuildRequires:  gcc make perl-devel
BuildRequires:  perl-generators perl-interpreter perl(:VERSION) >= 5.6
BuildRequires:  perl(base) perl(Config) perl(constant)
BuildRequires:  perl(DBI) >= 1.607 perl(DBI::DBD) perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires:  perl(File::Spec) >= 0.82 perl(strict)

BuildRequires:  perl(DynaLoader) perl(locale) perl(Scalar::Util)
BuildRequires:  perl(Tie::Hash) perl(warnings) sed

BuildRequires:  perl(bytes) perl(Carp) perl(Data::Dumper)
BuildRequires:  perl(Encode) perl(Exporter) perl(File::Spec::Functions)
BuildRequires:  perl(File::Temp) perl(FindBin) perl(lib)

BuildRequires:  perl(Test::More) perl(Test::NoWarnings) >= 0.081
BuildRequires:  perl(Unicode::UCD)

Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

%{?perl_default_filter}

%description
SQLite is a software library that implements a self-sufficient, serverless,
zero-configuration, transactional SQL database engine.

SQLite can be integrated with Perl using the Perl DBI module.
The Perl DBI module is the database access module for the Perl programming language.

%package        help
Summary:        Including man files for perl-DBD-SQLite
Requires:       man

%description    help
This contains man files for the using of perl-DBD-SQLite.


%prep
%autosetup -n DBD-SQLite-%{version} -p1

rm sqlite*
sed -i -e '/^sqlite/ d' MANIFEST
rm -rf inc
sed -i -e '/^inc\// d' MANIFEST

%build
CFLAGS="%{optflags}" perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
%make_build OPTIMIZE="%{optflags}"

%install
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -name '*.bs' -type f -delete
%{_fixperms} %{buildroot}/*

%check
make test

%files
%doc Changes README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/DBD/

%files help
%{_mandir}/man3/*.3pm*

%changelog
* Tue Aug 18 2020 yangzhuangzhuang<yangzhuangzhuang1@huawei.com> - 1.58-5
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:rebuild for requirement package update

* Sat Aug 31 2019 zhangsaisai<zhangsaisai@huawei.com> - 1.58-4
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:openEuler Debranding.

* Wed Aug 21 2019 guiyao<guiyao@huawei.com> - 1.58-3.h2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:change patchs' name

* Tue Apr 16 2019 wangxiao<wangxiao65@huawei.com> - 1.58-3.h1
- Type:bugfix
- ID:NA
- SUG:restart
- DESC:Handle unknown op in DBD SQLite VirtualTable PerlData
       added a boilerplace for test
       fixed for older DBI
- Package init
