%define pdir DBD
%define pnam mysql
-%include /usr/lib/rpm/macros.perl
Summary: A MySQL interface for Perl
Summary(cs.UTF-8): MySQL rozhraní pro Perl
Summary(da.UTF-8): En MySQL-grænseflade for Perl
Summary(uk.UTF-8): Perl-інтерфейс до MySQL
Summary(zh_CN.UTF-8): Perl 的 MySQL 界面。
Name: perl-DBD-mysql
-Version: 4.018
-Release: 3
+Version: 4.050
+Release: 6
# NOTE: libmysqlclient infects everything that links against it with GPL
License: GPL (Perl code also Artistic)
Group: Development/Languages/Perl
-Source0: http://www.cpan.org/modules/by-module/DBD/CAPTTOFU/%{pdir}-%{pnam}-%{version}.tar.gz
-# Source0-md5: d1d4ee2f20910d6491d1b6216471b2f1
+Source0: http://www.cpan.org/modules/by-module/DBD/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 29b1f61321d0892885ccfd0e7bc07f7f
+Patch0: headers.patch
URL: http://search.cpan.org/dist/DBD-mysql/
BuildRequires: mysql-devel >= 5.0.27
BuildRequires: perl-DBI >= 1.13
-BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: perl-Devel-CheckLib
+%if %{with tests}
+BuildRequires: perl-Test-Deep
+BuildRequires: perl-Test-Simple
+%endif
+BuildRequires: perl-devel >= 1:5.8.1
BuildRequires: rpm-perlprov >= 4.1-13
+Requires: perl-DBI >= 1.13
Obsoletes: perl-DBD-MySQL
Obsoletes: perl-DBD-Mysql
Obsoletes: perl-Msql-Mysql-modules
%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch0 -p1
# we don't need no bundles
-rm -rf lib/Bundle
+%{__rm} -r lib/Bundle
%build
%{__perl} Makefile.PL \
+ --cflags="$(mysql_config --cflags) %{rpmcflags} -Werror=implicit-function-declaration" \
INSTALLDIRS=vendor
+
%{__make} \
CC="%{__cc}" \
- OPTIMIZE="%{rpmcflags}"
%{?with_tests:%{__make} test}
%install
rm -rf $RPM_BUILD_ROOT
-
%{__make} pure_install \
DESTDIR=$RPM_BUILD_ROOT
%{?perl_install_postclean}
-rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/%{pdir}/%{pnam}/INSTALL.pod
+%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/DBD/mysql/INSTALL.pod
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/DBD::mysql::INSTALL.3pm
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc ChangeLog README TODO
+%doc README.md Changes
%{perl_vendorarch}/DBD/mysql.pm
%dir %{perl_vendorarch}/DBD/mysql
%{perl_vendorarch}/DBD/mysql/GetInfo.pm
%dir %{perl_vendorarch}/auto/DBD/mysql
-%{perl_vendorarch}/auto/DBD/mysql/mysql.bs
%attr(755,root,root) %{perl_vendorarch}/auto/DBD/mysql/mysql.so
-%{_mandir}/man3/[DM]*
+%{_mandir}/man3/DBD::mysql.3pm*