# Conditional build:
%bcond_with tests # perform "make test"
# tests require access to a working MySQL
-#
-%include /usr/lib/rpm/macros.perl
+
%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.001
-Release: 1
+Version: 4.022
+Release: 2
# 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/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
-# Source0-md5: f1c70b2760365300873ccfa59cefceb2
+Source0: http://www.cpan.org/modules/by-module/DBD/CAPTTOFU/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 20fb571245e3b9ac275b8329025c4bf6
+Patch0: headers.patch
URL: http://search.cpan.org/dist/DBD-mysql/
BuildRequires: mysql-devel >= 5.0.27
BuildRequires: perl-DBI >= 1.13
%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch0 -p1
# we don't need no bundles
rm -rf lib/Bundle
%build
%{__perl} Makefile.PL \
+ --cflags="$(mysql_config --cflags) %{rpmcflags} -Werror=implicit-function-declaration" \
INSTALLDIRS=vendor
+
%{__make} \
- OPTIMIZE="%{rpmcflags}"
+ CC="%{__cc}" \
%{?with_tests:%{__make} test}