#
# Conditional build:
-# _without_tests - do not perform "make test"
+%bcond_without tests # do not perform "make test"
#
%include /usr/lib/rpm/macros.perl
%define pdir Cache
%define pnam Cache
-Summary: Cache::Cache perl extension
-Summary(pl): Rozszerzenie perla: Cache::Cache
+Summary: Cache::Cache - a generic interface for creating persistent data stores
+Summary(pl): Cache::Cache - ogólny interfejs do trwa³ego przechowywania danych
Name: perl-Cache-Cache
-Version: 1.01
-Release: 4
-License: GPL/Artistic
+Version: 1.03
+Release: 1
+License: GPL or Artistic
Group: Development/Languages/Perl
-Source0: ftp://ftp.cpan.org/pub/CPAN/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 5482dea509c2133d1ffbfbd031d2f1c9
URL: http://perl-cache.sourceforge.net/
-BuildRequires: perl >= 5.6.1
-%if %{?_without_tests:0}%{!?_without_tests:1}
+BuildRequires: perl-devel >= 1:5.8.0
+%if %{with tests}
BuildRequires: perl-Digest-SHA1 >= 2.01
BuildRequires: perl-Error >= 0.15
BuildRequires: perl(File::Spec) >= 0.82
BuildRequires: perl-IPC-ShareLite >= 0.08
-BuildRequires: perl-Storable >= 1.014
%endif
-BuildRequires: rpm-perlprov >= 3.0.3-16
+BuildRequires: rpm-perlprov >= 4.1-13
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%setup -q -n %{pdir}-%{pnam}-%{version}
%build
-perl -MExtUtils::MakeMaker -wle 'WriteMakefile(NAME=>"Cache::Cache")'
+%{__perl} -MExtUtils::MakeMaker -wle 'WriteMakefile(NAME=>"Cache::Cache")' \
+ INSTALLDIRS=vendor
%{__make}
-%{!?_without_tests:%{__make} test}
+%{?with_tests:%{__make} test}
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc CHANGES COPYING CREDITS DISCLAIMER README STYLE
-%{perl_sitelib}/Cache/*.pm
+%{perl_vendorlib}/Cache/*.pm
%{_mandir}/man3/*