3 %bcond_without tests # do not perform "make test"
6 %define pnam Cache-Transparent
7 Summary: HTTP::Cache::Transparent - Cache the result of HTTP GET requests persistently
8 Summary(pl.UTF-8): HTTP::Cache::Transparent - trwałe zapamiętywanie wyników żądań HTTP GET
9 Name: perl-HTTP-Cache-Transparent
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: e198345ce8eee2562c807e84d65e3b4f
17 URL: http://search.cpan.org/dist/HTTP-Cache-Transparent/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: perl(LWP)
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 An implementation of HTTP GET that keeps a local cache of fetched
28 pages to avoid fetching the same data from the server if it hasn't
29 been updated. The cache is stored on disk and is thus persistent
32 Uses the HTTP headers If-Modified-Since and ETag to let the server
33 decide if the version in the cache is up-to-date or not.
35 The cache is implemented by modifying the LWP::UserAgent class to
36 seamlessly cache the result of all requests that can be cached.
38 %description -l pl.UTF-8
39 Implementacja HTTP GET przechowująca w lokalnej pamięci podręcznej
40 ściągnięte strony, aby zapobiec ściąganiu tych samych danych z
41 serwera, jeśli nie zostały uaktualnione. Pamięć podręczna jest
42 zachowywana na dysku, więc jest trwała pomiędzy wywołaniami.
44 Moduł używa nagłówków HTTP If-Modified-Since i ETag, aby umożliwić
45 serwerowi zdecydowanie, czy wersja w buforze jest aktualna, czy nie.
47 Pamięć podręczna jest zaimplementowana poprzez modyfikację klasy
48 LWP::UserAgent, aby w sposób przezroczysty zapamiętywać wyniki
49 wszystkich żądań, które mogą być zapamiętane.
52 %setup -q -n %{pdir}-%{pnam}-%{version}
55 %{__perl} Makefile.PL \
59 %{?with_tests:%{__make} test}
62 rm -rf $RPM_BUILD_ROOT
64 %{__make} pure_install \
65 DESTDIR=$RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
68 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
76 # perhaps HTTP/Cache dir into perl-base?
77 %dir %{perl_vendorlib}/HTTP/Cache
78 %{perl_vendorlib}/HTTP/Cache/*.pm
80 %{_examplesdir}/%{name}-%{version}