File perl-DBM-Deep.spec of Package perl-DBM-Deep

#
# spec file for package perl-DBM-Deep
#
# 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/
#


%bcond_with test

Name:           perl-DBM-Deep
%define cpan_name DBM-Deep
Summary:        Pure perl multi-level hash/array DBM that supports transactions
License:        GPL-1.0+ or Artistic-1.0
Group:          Development/Libraries/Perl
Version:        2.0004
Release:        0
Url:            http://search.cpan.org/dist/DBM-Deep/
Source:         http://www.cpan.org/modules/by-module/DBM/DBM-Deep-%{version}.tar.gz
# would require Test::More >= 0.88 (done_testing)
%if 0%{?suse_version} < 1120
Patch0:         %{name}_Build_n_Test.patch
%endif
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Digest::MD5) >= 1.00
BuildRequires:  perl(Fcntl) >= 0.01
BuildRequires:  perl(File::Path) >= 0.01
BuildRequires:  perl(File::Temp) >= 0.01
BuildRequires:  perl(IO::Scalar) >= 0.01
BuildRequires:  perl(Module::Build)
BuildRequires:  perl(Scalar::Util) >= 1.14
BuildRequires:  perl(Test::Deep) >= 0.095
BuildRequires:  perl(Test::Exception) >= 0.21
BuildRequires:  perl(Test::Warn) >= 0.08
%if %{with test}
BuildRequires:  perl(Test::Pod) >= 1.14
BuildRequires:  perl(Test::Pod::Coverage) >= 1.04
%endif
Requires:       perl(Digest::MD5) >= 1.00
Requires:       perl(Fcntl) >= 0.01
Requires:       perl(Scalar::Util) >= 1.14

%description
A unique flat-file database module, written in pure perl. True multi-level
hash/array support (unlike MLDBM, which is faked), hybrid OO / tie()
interface, cross-platform FTPable files, ACID transactions, and is quite
fast. Can handle millions of keys and unlimited levels without significant
slow-down. Written from the ground-up in pure perl -- this is NOT a
wrapper around a C-based DBM. Out-of-the-box compatibility with Unix, Mac
OS X and Windows.

Author:
-------
    Rob Kinyon, <rkinyon@cpan.org>
    Joseph Huckaby, <jhuckaby@cpan.org>

%prep
%setup -q -n %{cpan_name}-%{version}
# would require Test::More >= 0.88 (done_testing)
%if 0%{?suse_version} < 1120
%patch0 -p1
%endif
%{__chmod} 0644 utils/upgrade_db.pl

%build
%{__perl} Build.PL installdirs=vendor
./Build

%check
LONG_TESTS=1 ./Build test

%install
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
%perl_gen_filelist

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes etc README utils

%changelog
openSUSE Build Service is sponsored by