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