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