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 Group: Development/Languages/Perl
14 Source0: http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/%{pdir}-%{version}.tar.gz
15 # Source0-md5: 6c15e885c089115f8263a5873ed74f1e
16 URL: http://search.cpan.org/dist/Guard/
17 BuildRequires: perl-devel >= 1:5.8.0
18 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 This module implements so-called "guards". A guard is something
25 (usually an object) that "guards" a resource, ensuring that it is
26 cleaned up when expected.
28 Specifically, this module supports two different types of guards:
29 guard objects, which execute a given code block when destroyed, and
30 scoped guards, which are tied to the scope exit.
32 %description -l pl.UTF-8
33 Moduł ten implementuje tzw "strażników". Strażnik jest czymś (zwykle
34 obiektem), co strzeże zasobu, zapewniając jego usunięcie wtedy kiedy
38 %setup -q -n %{pdir}-%{version}
41 %{__perl} Makefile.PL \
45 OPTIMIZE="%{rpmcflags}"
47 %{?with_tests:%{__make} test}
50 rm -rf $RPM_BUILD_ROOT
52 %{__make} pure_install \
53 DESTDIR=$RPM_BUILD_ROOT
56 rm -rf $RPM_BUILD_ROOT
59 %defattr(644,root,root,755)
61 %{perl_vendorarch}/Guard.pm
62 %dir %{perl_vendorarch}/auto/Guard/
63 %{perl_vendorarch}/auto/Guard/Guard.bs
64 %attr(755,root,root) %{perl_vendorarch}/auto/Guard/Guard.so