3 %bcond_without tests # do not perform "make test"
5 %define db_ver %(rpm -q --whatprovides --qf '%%|E?{%%{E}:}|%%{V}' db-devel)
7 %include /usr/lib/rpm/macros.perl
10 Summary: DB_File allows to manage a simple ASCII database
11 Summary(pl.UTF-8): DB_File pozwala na korzystanie z prostej, tekstowej bazy danych
16 License: GPL v1+ or Artistic
17 Group: Development/Languages/Perl
18 Source0: http://www.cpan.org/modules/by-module/DB_File/%{pnam}-%{version}.tar.gz
19 # Source0-md5: 8a2e98d457a216840ac893913c24141e
20 Patch0: %{name}-rpm-automation.patch
21 URL: http://search.cpan.org/dist/DB_File/
22 BuildRequires: db-devel
23 BuildRequires: perl-devel >= 1:5.8.0
24 BuildRequires: rpm-perlprov >= 4.1-13
25 Requires: db = %{db_ver}
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 DB_File is a module which allows Perl programs to make use of the
30 facilities provided by Berkeley DB version 1.
32 %description -l pl.UTF-8
33 DB_File jest modułem, który pozwala programom w Perlu na korzystanie
34 z udogodnień dostarczanych przez Berkeley DB w wersji 1.
37 %setup -q -n %{pnam}-%{version}
41 %{__perl} -pi -e "s/INSTALLDIRS => 'perl',//" Makefile.PL
42 %{__perl} Makefile.PL \
46 OPTIMIZE="%{rpmcflags}"
48 %{?with_tests:%{__make} test}
51 rm -rf $RPM_BUILD_ROOT
54 DESTDIR=$RPM_BUILD_ROOT
57 rm -rf $RPM_BUILD_ROOT
60 %defattr(644,root,root,755)
62 %{perl_vendorarch}/DB_File.pm
63 %dir %{perl_vendorarch}/auto/DB_File
64 %attr(755,root,root) %{perl_vendorarch}/auto/DB_File/DB_File.so
65 %{_mandir}/man3/DB_File.3pm*