File perl-DBD-mysql.spec of Package perl-DBD-mysql

#
# spec file for package perl-DBD-mysql
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           perl-DBD-mysql
%define cpan_name DBD-mysql
Summary:        MySQL driver for the Perl5 Database Interface (DBI)
License:        GPL-1.0+ or Artistic-1.0
Group:          Development/Libraries/Perl
Version:        4.021
Release:        0
Url:            http://search.cpan.org/dist/DBD-mysql/
Source:         http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/%{cpan_name}-%{version}.tar.gz
Patch1:         bnc658792_pod_name_install.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# quilt does not grock that
%{perl_requires}
BuildRequires:  mysql-devel
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(DBI) >= 1.08
BuildRequires:  perl(Data::Dumper)
Requires:       perl(DBI) >= 1.08
Requires:       perl(Data::Dumper)

%description
DBD::mysql is the Perl5 Database Interface driver for the MySQL database.
In other words: DBD::mysql is an interface between the Perl programming
language and the MySQL programming API that comes with the MySQL relational
database management system. Most functions provided by this programming API
are supported. Some rarely used functions are missing, mainly because noone
ever requested them. :-)

%prep
%setup -q -n %{cpan_name}-%{version}
# rpmlint: executable-docs,
#  spurious-executable-perm
#  script-without-shebang
find -type f -exec %{__chmod} 0644 {} \;
%patch1 -p1

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor --cflags="-I%{_includedir}/mysql $RPM_OPT_FLAGS"

%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files -f %{name}.files
%defattr(-,root,root,-)
%doc ChangeLog eg INSTALL.html README TODO

%changelog
openSUSE Build Service is sponsored by