Blob Blame History Raw
# Need to know the exact DB version we're built against
%global db_ver %(sed '/DB_VERSION_STRING/!d;s/.*Berkeley DB[[:space:]]*\\([^:]*\\):.*/\\1/' /usr/include/db4/db.h 2>/dev/null || echo 4.0.0)

Name:           perl-BerkeleyDB
Version:        0.41
Release:        3%{?dist}
Summary:        Perl extension for Berkeley DB version 2, 3 or 4
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/BerkeleyDB/
Source0:        http://www.cpan.org/authors/id/P/PM/PMQS/BerkeleyDB-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  db4-devel
BuildRequires:  perl(ExtUtils::MakeMaker)
# For "make test".
BuildRequires:  perl(MLDBM)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Pod)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
# Hard-code Berkeley DB requirement to avoid problems like #592209
Requires:       db4 = %{db_ver}

# Don't "provide" private Perl libs
%{?perl_default_filter}

%description
BerkeleyDB is a module that allows Perl programs to make use of the
facilities provided by Berkeley DB. Berkeley DB is a C library that
provides a consistent interface to a number of database formats.
BerkeleyDB provides an interface to all four of the database types
(hash, btree, queue and recno) currently supported by Berkeley DB.

%prep
%setup -q -n BerkeleyDB-%{version}
%{__perl} -pi -e 's,/local/,/, if ($. == 1)' dbinfo
chmod -x Changes README

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT

install -D -m755 dbinfo $RPM_BUILD_ROOT%{_bindir}/dbinfo

find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} $RPM_BUILD_ROOT/*

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc Changes README Todo
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/BerkeleyDB*
%{_mandir}/man3/*
%{_bindir}/*

%changelog
* Tue May 25 2010 Paul Howarth <paul@city-fan.org> - 0.41-3
- Rebuild for Berkeley DB 4.8.30 in F-13 and Rawhide (#592209)
- Hard-code Berkeley DB requirement to avoid problems like #592209
- Add %%{?perl_default_filter}

* Thu Apr 29 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.41-2
- Mass rebuild with perl-5.12.0

* Sat Feb 13 2010 Steven Pritchard <steve@kspei.com> 0.41-1
- Update to 0.41.

* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 0.39-2
- rebuild against perl 5.10.1

* Sat Aug 29 2009 Steven Pritchard <steve@kspei.com> 0.39-1
- Update to 0.39.

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.38-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jun 04 2009 Steven Pritchard <steve@kspei.com> 0.38-1
- Update to 0.38.

* Thu Jun 04 2009 Steven Pritchard <steve@kspei.com> 0.36-1
- Update to 0.36.

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.34-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu May 15 2008 Steven Pritchard <steve@kspei.com> 0.34-1
- Update to 0.34.

* Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.33-3
Rebuild for new perl

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.33-2
- Autorebuild for GCC 4.3

* Mon Jan 28 2008 Steven Pritchard <steve@kspei.com> 0.33-1
- Update to 0.33.
- Update License tag.
- BR Test::More.

* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 0.32-2
- Rebuild for selinux ppc32 issue.

* Fri Jul 13 2007 Steven Pritchard <steve@kspei.com> 0.32-1
- Update to 0.32.

* Tue Apr 17 2007 Steven Pritchard <steve@kspei.com> 0.31-3
- BR ExtUtils::MakeMaker.

* Mon Oct 16 2006 Steven Pritchard <steve@kspei.com> 0.31-2
- Rebuild.

* Mon Oct 16 2006 Steven Pritchard <steve@kspei.com> 0.31-1
- Update to 0.31.
- Use fixperms macro instead of our own chmod incantation.

* Wed Sep 13 2006 Steven Pritchard <steve@kspei.com> 0.30-1
- Update to 0.30.

* Mon Aug 28 2006 Steven Pritchard <steve@kspei.com> 0.29-2
- Minor spec cleanup.

* Fri Jul 07 2006 Steven Pritchard <steve@kspei.com> 0.29-1
- Update to 0.29.

* Fri Jun 30 2006 Steven Pritchard <steve@kspei.com> 0.28-1
- Update to 0.28

* Sat Feb 18 2006 Steven Pritchard <steve@kspei.com> 0.27-2
- Rebuild

* Tue Jan 10 2006 Steven Pritchard <steve@kspei.com> 0.27-1
- Update to 0.27

* Wed Oct 12 2005 Steven Pritchard <steve@kspei.com> 0.26-6
- Another rebuild

* Sat Sep 24 2005 Steven Pritchard <steve@kspei.com> 0.26-5
- Rebuild for new db4 in rawhide

* Mon Sep 05 2005 Steven Pritchard <steve@kspei.com> 0.26-4
- Spec cleanup
- Include COPYING and Artistic

* Wed Aug 03 2005 Steven Pritchard <steve@kspei.com> 0.26-3
- Move OPTIMIZE to Makefile.PL instead of make

* Mon Aug 01 2005 Steven Pritchard <steve@kspei.com> 0.26-2
- Various fixes from Paul Howarth:
  - Add description
  - Fix permissions on docs (also Paul Howarth)
  - Add OPTIMIZE to make
  - Don't own perl_vendorarch/auto/
  - BuildRequire Test::Pod and MLDBM

* Wed Jul 06 2005 Steven Pritchard <steve@kspei.com> 0.26-1
- Specfile autogenerated.
- Add BuildRequires db4-devel.
- Install dbinfo script.