File perl-BerkeleyDB.spec of Package perl-BerkeleyDB

#
# spec file for package perl-BerkeleyDB (Version 0.43)
#
# Copyright (c) 2010 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/
#

# norootforbuild

%bcond_with opt

Name:           perl-BerkeleyDB
%define cpan_name BerkeleyDB
Summary:        Perl extension for Berkeley DB version 2, 3 or 4
Version:        0.43
Release:        2
License:        GPL+ or Artistic
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/BerkeleyDB/
#Source:         http://www.cpan.org/modules/by-module/BerkeleyDB/BerkeleyDB-%{version}.tar.gz
Source:         %{cpan_name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires:  db-devel
BuildRequires:  perl
BuildRequires:  perl-macros
%if %{with opt}
BuildRequires:  perl(MLDBM)
%endif
#

%description
This Perl module provides an interface to most of the functionality available
in Berkeley DB versions 2, 3 and 4. In general it is safe to assume that the
interface provided here to be identical to the Berkeley DB interface. The main
changes have been to make the Berkeley DB API work in a Perl way. Note that if
you are using Berkeley DB 2.x, the new features available in
Berkeley DB 3.x or DB 4.x are not available via this module.

Authors:
--------
    Paul Marquess <pmqs@cpan.org>

%prep
%setup -q -n %{cpan_name}-%{version}
# rpmlint
# executable-docs, spurious-executable-perm
%{__chmod} a-x Changes README

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$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 Changes README Todo

%changelog