%define	version 4.050
%define	release 1

Summary:        A MySQL interface for perl
Summary(ja):    MySQL用のperlインターフェイス
Name:           perl-DBD-MySQL
Version:        4.050
Release:        2%{?_dist_release}
Group:          programming
Vendor:         Project Vine
Distribution:   Vine Linux

License:        GPL+ or Artistic
URL:            https://metacpan.org/pod/DBD::mysql
Source:	        https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-%{version}.tar.gz
Source1:        filter-requires-dbdmysql.sh
# Remove a useless shebang, bug #1813195,
# <https://github.com/perl5-dbi/DBD-mysql/pull/321>
Patch0:         DBD-mysql-4.050-Remove-a-useless-shebang-from-DBD-mysql.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  libmariadb-devel
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(DynaLoader)
BuildRequires:  perl(DBI)
BuildRequires:  perl(Devel::CheckLib)
BuildRequires:  zlib-devel
Requires:       perl
Requires:       perl-DBI
Provides:       perl-DBD-mysql = %{version}-%{release}

%description 
An implementation of DBI for MySQL for Perl.

%description -l ja
perlを使ったMySQL用のDBI

# Provide perl-specific find-{provides,requires}.
#define __find_provides /usr/lib/rpm/find-provides.perl
#define __find_requires /usr/lib/rpm/find-requires.perl
%define __perl_requires %{SOURCE1}


%debug_package


%prep
%setup -q -n DBD-mysql-%{version}
%patch0 -p1
# Correct file permissions
find . -type f -exec chmod -x {} ';'


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


%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%{make_install}
find %{buildroot} -type f -name '*.bs' -empty -delete
%{_fixperms} %{buildroot}/*


%check || :
# Full test coverage requires a live MySQL database
# make test


%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}


%files 
%license LICENSE
%doc Changes README.md
%{perl_vendorarch}/Bundle/
%{perl_vendorarch}/DBD/
%{perl_vendorarch}/auto/DBD/
%{_mandir}/*/*


%changelog
* Thu Nov 18 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.050-2
- rebuilt with perl-5.34.0.

* Sat May 18 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.050-1
- new upstream release.
- rebuilt with perl-5.26.

* Tue Jul  1 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.027-1
- new upstream release.

* Thu Mar 08 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 4.020-1
- updated to 4.020-1

* Sat Apr 30 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.006-5
- rebuild with perl-5.12.3

* Thu May 21 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.006-4
- rebuilt with MySQL-5.1.34.

* Wed Apr 08 2009 Shu KONNO <owa@bg.wakwak.com> 4.006-3
- spec in utf-8

* Thu May  1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 4.006-2
- rebuilt with perl-5.10.0.

* Wed Apr 23 2008 IWAI, Masaharu <iwaim@cc.mbn.or.jp> 4.006-1
- new upstream release
- add missing changelog: 4.001-0vl1

* Sun Feb  4 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.001-0vl1
- updated to 4.001

* Sun Sep 10 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.0007-0vl1
- updated to 3.0007
- changed Group to Development/Libraries
- installed files to vendor_perl

* Mon Jan 10 2005 Satoshi MACHINO <machino@vinelinux.org> 2.9004-0vl1
- new upstream version(DBD-mysql-2.9004)
- fixed spec file
	-- used rpm macros
	-- fixed package's dependencies
	-- built with perl-5.8.6, MySQL-4.0.21, perl-DBI-1.46

* Tue Oct 12 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.2219-0vl2
- rebuilt with perl-5.8.2 and MySQL-4.0.21

* Sat Feb 23 2002 Satoshi MACHINO <machino@vinelinux.org> 1.2219-0vl1
- updated Msql-Mysql-modules-1.2219

* Wed Dec 05 2001 Satoshi MACHINO <machino@vinelinux.org> 1.2216-1vl4
- added BuildRequires: perl >= 1:5.6.0, perl-DBI >= 1.15, zlib-devel

* Mon Jun 18 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
- rebuilt with perl-5.6.1
- Spec was written in Shift_JIS. Fixed.
- modified %%files section

* Fri Jun 15 2001 Satoshi MACHINO <machino@vinelinux.org> 1.2216-1vl2
- rebuild on perl-5.6.0
- removed perl version in Requires
- changed mandir to /usr/share/man 

* Sun May 27 2001 Satoshi MACHINO <machino@vinelinux.org> 1.2216-1vl1
- build on Vine Linux

* Tue May  1 2001 Trond Eivind Glomsr <teg@redhat.com>
- 1.2216
- Add doc files
- Minor cleanups

* Thu Nov 30 2000 Trond Eivind Glomsr <teg@redhat.com>
- First cut