Name: perl-BerkeleyDB
Version: 0.27
Release: 1%{?dist}
Summary: BerkeleyDB Perl module
License: GPL or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/BerkeleyDB/
Source0: http://www.cpan.org/modules/by-module/BerkeleyDB/BerkeleyDB-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: db4-devel
# For "make test".
BuildRequires: perl(Test::Pod), perl(MLDBM)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%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"
%{__perl} -pi -e 's/^\tLD_RUN_PATH=[^\s]+\s*/\t/' Makefile
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 -type d -depth -exec rmdir {} 2>/dev/null \;
chmod -R u+rwX,go+rX,go-w $RPM_BUILD_ROOT/*
perldoc -t perlgpl > COPYING
perldoc -t perlartistic > Artistic
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Changes README Todo COPYING Artistic
%{perl_vendorarch}/BerkeleyDB*
%{perl_vendorarch}/auto/*
%{_mandir}/man3/*
%{_bindir}/*
%changelog
* 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.