3 %bcond_without tests # do not perform "make test"
6 Summary: Guard - safe cleanup blocks
7 Summary(pl.UTF-8): Guard - bezpieczne czyszczenie bloków
12 License: GPL v1+ or Artistic
13 Group: Development/Languages/Perl
14 Source0: http://www.cpan.org/modules/by-authors/id/M/ML/MLEHMANN/%{pdir}-%{version}.tar.gz
15 # Source0-md5: dbbb944601a31f60ee58954ad4cb65b4
16 URL: http://search.cpan.org/dist/Guard/
17 BuildRequires: perl-devel >= 1:5.8.0
18 BuildRequires: rpm-perlprov >= 4.1-13
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 This module implements so-called "guards". A guard is something
23 (usually an object) that "guards" a resource, ensuring that it is
24 cleaned up when expected.
26 Specifically, this module supports two different types of guards:
27 guard objects, which execute a given code block when destroyed, and
28 scoped guards, which are tied to the scope exit.
30 %description -l pl.UTF-8
31 Moduł ten implementuje tzw. "strażników". Strażnik jest czymś (zwykle
32 obiektem), co strzeże zasobu, zapewniając jego usunięcie wtedy, kiedy
35 W szczegóności moduł ten obsługuje dwa rodzaje strażników:
36 - obiekty strażników, wykonujące dany blok kodu w trakcie niszczenia
37 - strażników zakresowych, powiązanych z zakończeniem zakresu (scope).
40 %setup -q -n %{pdir}-%{version}
43 %{__perl} Makefile.PL \
47 OPTIMIZE="%{rpmcflags}"
49 %{?with_tests:%{__make} test}
52 rm -rf $RPM_BUILD_ROOT
54 %{__make} pure_install \
55 DESTDIR=$RPM_BUILD_ROOT
58 rm -rf $RPM_BUILD_ROOT
61 %defattr(644,root,root,755)
63 %{perl_vendorarch}/Guard.pm
64 %dir %{perl_vendorarch}/auto/Guard
65 %attr(755,root,root) %{perl_vendorarch}/auto/Guard/Guard.so
66 %{_mandir}/man3/Guard.3pm*