1d864be
# We have db4 up to Fedora 13, then db5 (in the libdb package)
1d864be
%if 0%{?fedora} > 13
1d864be
%global db_pkg libdb
1d864be
%else
1d864be
%global db_pkg db4
1d864be
%endif
1d864be
1d864be
# We need to know the exact DB version we're built against
1d864be
%global db_ver %(sed '/DB_VERSION_STRING/!d;s/.*Berkeley DB[[:space:]]*\\([^:]*\\):.*/\\1/' /usr/include/db.h 2>/dev/null || echo 4.0.0)
08279d0
1068f6b
Name:           perl-BerkeleyDB
Marcela Mašláňová 2554f11
Version:        0.43
Jesse Keating a0afb94
Release:        3%{?dist}
1d864be
Summary:        Interface to Berkeley DB
216d468
License:        GPL+ or Artistic
1068f6b
Group:          Development/Libraries
1068f6b
URL:            http://search.cpan.org/dist/BerkeleyDB/
3139c21
Source0:        http://www.cpan.org/authors/id/P/PM/PMQS/BerkeleyDB-%{version}.tar.gz
1068f6b
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1d864be
BuildRequires:  %{db_pkg}-devel
efdeb59
BuildRequires:  perl(ExtUtils::MakeMaker)
1068f6b
# For "make test".
efdeb59
BuildRequires:  perl(MLDBM)
216d468
BuildRequires:  perl(Test::More)
efdeb59
BuildRequires:  perl(Test::Pod)
1068f6b
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
08279d0
# Hard-code Berkeley DB requirement to avoid problems like #592209
1d864be
Requires:       %{db_pkg} = %{db_ver}
08279d0
08279d0
# Don't "provide" private Perl libs
08279d0
%{?perl_default_filter}
1068f6b
1068f6b
%description
1068f6b
BerkeleyDB is a module that allows Perl programs to make use of the
1068f6b
facilities provided by Berkeley DB. Berkeley DB is a C library that
1068f6b
provides a consistent interface to a number of database formats.
1068f6b
BerkeleyDB provides an interface to all four of the database types
1068f6b
(hash, btree, queue and recno) currently supported by Berkeley DB.
1068f6b
1068f6b
%prep
1068f6b
%setup -q -n BerkeleyDB-%{version}
1068f6b
%{__perl} -pi -e 's,/local/,/, if ($. == 1)' dbinfo
1068f6b
chmod -x Changes README
1068f6b
1068f6b
%build
f3cd687
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
f3cd687
make %{?_smp_mflags}
1068f6b
1068f6b
%install
1068f6b
rm -rf $RPM_BUILD_ROOT
1068f6b
1d864be
make pure_install DESTDIR=$RPM_BUILD_ROOT
1068f6b
1068f6b
install -D -m755 dbinfo $RPM_BUILD_ROOT%{_bindir}/dbinfo
1068f6b
1068f6b
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
1068f6b
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
8c0968f
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
1068f6b
930e30a
%{_fixperms} $RPM_BUILD_ROOT/*
1068f6b
a962847
%check
1068f6b
make test
1068f6b
1068f6b
%clean
1068f6b
rm -rf $RPM_BUILD_ROOT
1068f6b
1068f6b
%files
1068f6b
%defattr(-,root,root,-)
1d864be
%doc README Changes Todo
1d864be
%{_bindir}/dbinfo
1d864be
%{perl_vendorarch}/BerkeleyDB/
1d864be
%{perl_vendorarch}/BerkeleyDB.pm
1d864be
%doc %{perl_vendorarch}/BerkeleyDB.pod
1d864be
%{perl_vendorarch}/auto/BerkeleyDB/
1d864be
%{_mandir}/man3/BerkeleyDB.3pm*
1068f6b
1068f6b
%changelog
Jesse Keating a0afb94
* Wed Sep 29 2010 jkeating - 0.43-3
Jesse Keating a0afb94
- Rebuilt for gcc bug 634757
Jesse Keating a0afb94
0af503f
* Sun Sep 12 2010 Paul Howarth <paul@city-fan.org> - 0.43-2
0af503f
- Rebuild for libdb 5.1.19 in Rawhide
0af503f
736f0ff
* Tue Aug  3 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.43-1
Marcela Mašláňová 2554f11
- Update to 0.43
736f0ff
  - Changes to build with BDB 5.1
736f0ff
  - Dropped support for Server option when creating an environment
736f0ff
  - Documentation updates (CPAN RT#59202)
736f0ff
  - Fixed compilation error with MS Visual Studio 2005 (CPAN RT#59924)
736f0ff
1d864be
* Wed Jul  7 2010 Paul Howarth <paul@city-fan.org> - 0.42-1
1d864be
- Update to 0.42
1d864be
  - added $db->Env method to retrieve environment object from a database object
1d864be
  - get the tied interface to use truncate in the CLEAR method if available
1d864be
- Build with libdb (Berkeley DB 5.x) from Fedora 14 onwards (#612139)
1d864be
- Tag BerkeleyDB.pod as %%doc
1d864be
- Use DESTDIR rather than PERL_INSTALL_ROOT
1d864be
08279d0
* Tue May 25 2010 Paul Howarth <paul@city-fan.org> - 0.41-3
08279d0
- Rebuild for Berkeley DB 4.8.30 in F-13 and Rawhide (#592209)
08279d0
- Hard-code Berkeley DB requirement to avoid problems like #592209
08279d0
- Add %%{?perl_default_filter}
08279d0
698c420
* Thu Apr 29 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.41-2
698c420
- Mass rebuild with perl-5.12.0
698c420
741a1dc
* Sat Feb 13 2010 Steven Pritchard <steve@kspei.com> 0.41-1
741a1dc
- Update to 0.41.
741a1dc
4cd3f1e
* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 0.39-2
4cd3f1e
- rebuild against perl 5.10.1
4cd3f1e
53f99a4
* Sat Aug 29 2009 Steven Pritchard <steve@kspei.com> 0.39-1
53f99a4
- Update to 0.39.
53f99a4
7850984
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.38-2
7850984
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
7850984
60b91dd
* Thu Jun 04 2009 Steven Pritchard <steve@kspei.com> 0.38-1
60b91dd
- Update to 0.38.
60b91dd
60b91dd
* Thu Jun 04 2009 Steven Pritchard <steve@kspei.com> 0.36-1
60b91dd
- Update to 0.36.
60b91dd
e2e5fac
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.34-2
e2e5fac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
e2e5fac
09a7603
* Thu May 15 2008 Steven Pritchard <steve@kspei.com> 0.34-1
09a7603
- Update to 0.34.
09a7603
ae67244
* Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.33-3
ae67244
Rebuild for new perl
ae67244
4a5eb3b
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.33-2
4a5eb3b
- Autorebuild for GCC 4.3
4a5eb3b
216d468
* Mon Jan 28 2008 Steven Pritchard <steve@kspei.com> 0.33-1
216d468
- Update to 0.33.
216d468
- Update License tag.
216d468
- BR Test::More.
216d468
8423071
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 0.32-2
8423071
- Rebuild for selinux ppc32 issue.
8423071
38b8677
* Fri Jul 13 2007 Steven Pritchard <steve@kspei.com> 0.32-1
38b8677
- Update to 0.32.
38b8677
efdeb59
* Tue Apr 17 2007 Steven Pritchard <steve@kspei.com> 0.31-3
efdeb59
- BR ExtUtils::MakeMaker.
efdeb59
09f2830
* Mon Oct 16 2006 Steven Pritchard <steve@kspei.com> 0.31-2
09f2830
- Rebuild.
09f2830
930e30a
* Mon Oct 16 2006 Steven Pritchard <steve@kspei.com> 0.31-1
930e30a
- Update to 0.31.
930e30a
- Use fixperms macro instead of our own chmod incantation.
930e30a
17f4fe1
* Wed Sep 13 2006 Steven Pritchard <steve@kspei.com> 0.30-1
17f4fe1
- Update to 0.30.
17f4fe1
8c0968f
* Mon Aug 28 2006 Steven Pritchard <steve@kspei.com> 0.29-2
8c0968f
- Minor spec cleanup.
8c0968f
7207af2
* Fri Jul 07 2006 Steven Pritchard <steve@kspei.com> 0.29-1
7207af2
- Update to 0.29.
7207af2
3139c21
* Fri Jun 30 2006 Steven Pritchard <steve@kspei.com> 0.28-1
3139c21
- Update to 0.28
3139c21
d97d293
* Sat Feb 18 2006 Steven Pritchard <steve@kspei.com> 0.27-2
d97d293
- Rebuild
d97d293
80606b8
* Tue Jan 10 2006 Steven Pritchard <steve@kspei.com> 0.27-1
80606b8
- Update to 0.27
80606b8
22e4ac1
* Wed Oct 12 2005 Steven Pritchard <steve@kspei.com> 0.26-6
22e4ac1
- Another rebuild
22e4ac1
8737c28
* Sat Sep 24 2005 Steven Pritchard <steve@kspei.com> 0.26-5
8737c28
- Rebuild for new db4 in rawhide
8737c28
a962847
* Mon Sep 05 2005 Steven Pritchard <steve@kspei.com> 0.26-4
a962847
- Spec cleanup
a962847
- Include COPYING and Artistic
a962847
f3cd687
* Wed Aug 03 2005 Steven Pritchard <steve@kspei.com> 0.26-3
f3cd687
- Move OPTIMIZE to Makefile.PL instead of make
f3cd687
1068f6b
* Mon Aug 01 2005 Steven Pritchard <steve@kspei.com> 0.26-2
1068f6b
- Various fixes from Paul Howarth:
1068f6b
  - Add description
1068f6b
  - Fix permissions on docs (also Paul Howarth)
1068f6b
  - Add OPTIMIZE to make
1068f6b
  - Don't own perl_vendorarch/auto/
1068f6b
  - BuildRequire Test::Pod and MLDBM
1068f6b
1068f6b
* Wed Jul 06 2005 Steven Pritchard <steve@kspei.com> 0.26-1
1068f6b
- Specfile autogenerated.
1068f6b
- Add BuildRequires db4-devel.
1068f6b
- Install dbinfo script.