]>
Commit | Line | Data |
---|---|---|
82cd5b17 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Guard | |
7 | Summary: Guard - safe cleanup blocks | |
8 | Summary(pl.UTF-8): Guard - bezpieczne czyszczenie bloków | |
9 | Name: perl-Guard | |
00d8f99b | 10 | Version: 1.022 |
19913b0f | 11 | Release: 3 |
fe39478d JB |
12 | # same as perl |
13 | License: GPL v1+ or Artistic | |
82cd5b17 | 14 | Group: Development/Languages/Perl |
39282b86 | 15 | Source0: http://www.cpan.org/modules/by-authors/id/M/ML/MLEHMANN/%{pdir}-%{version}.tar.gz |
00d8f99b | 16 | # Source0-md5: 8d1d8b942fd5d0240f47906a6d6fac8c |
5da14597 | 17 | URL: http://search.cpan.org/dist/Guard/ |
82cd5b17 | 18 | BuildRequires: perl-devel >= 1:5.8.0 |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
82cd5b17 | 20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
22 | %description | |
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. | |
26 | ||
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. | |
30 | ||
31 | %description -l pl.UTF-8 | |
39282b86 JB |
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 | |
34 | jest ono oczekiwane. | |
35 | ||
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). | |
82cd5b17 | 39 | |
40 | %prep | |
41 | %setup -q -n %{pdir}-%{version} | |
42 | ||
43 | %build | |
44 | %{__perl} Makefile.PL \ | |
45 | INSTALLDIRS=vendor | |
46 | %{__make} \ | |
47 | CC="%{__cc}" \ | |
48 | OPTIMIZE="%{rpmcflags}" | |
49 | ||
50 | %{?with_tests:%{__make} test} | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %{__make} pure_install \ | |
56 | DESTDIR=$RPM_BUILD_ROOT | |
57 | ||
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %files | |
62 | %defattr(644,root,root,755) | |
fe39478d | 63 | %doc COPYING Changes |
82cd5b17 | 64 | %{perl_vendorarch}/Guard.pm |
39282b86 | 65 | %dir %{perl_vendorarch}/auto/Guard |
82cd5b17 | 66 | %attr(755,root,root) %{perl_vendorarch}/auto/Guard/Guard.so |
39282b86 | 67 | %{_mandir}/man3/Guard.3pm* |