]>
Commit | Line | Data |
---|---|---|
42928cde | 1 | # |
2 | # Conditional build: | |
e53bd4ff | 3 | %bcond_without tests # do not perform "make test" |
79fa1a7b | 4 | |
40001a1f | 5 | %define pdir Attribute |
6 | %define pnam Handlers-Prospective | |
79fa1a7b | 7 | %include /usr/lib/rpm/macros.perl |
e06859ea | 8 | Summary: Attribute::Handlers::Prospective - enhanced definition of attribute handlers |
bcb44525 | 9 | Summary(pl.UTF-8): Attribute::Handlers::Prospective - rozszerzona definicja obsługi atrybutów |
42928cde | 10 | Name: perl-Attribute-Handlers-Prospective |
11 | Version: 0.01 | |
35f77fa7 | 12 | Release: 6 |
5148ae86 | 13 | # same as perl |
14 | License: GPL v1+ or Artistic | |
42928cde | 15 | Group: Development/Languages/Perl |
58207fd2 | 16 | Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz |
3d563ad0 | 17 | # Source0-md5: d20442ca3d7f83aacbdb15f225fdf287 |
79fa1a7b | 18 | URL: http://search.cpan.org/dist/Attribute-Handlers-Prospective/ |
2ef636da | 19 | BuildRequires: perl-devel >= 1:5.8.0 |
79fa1a7b | 20 | BuildRequires: rpm-perlprov >= 4.1-13 |
e53bd4ff | 21 | %if %{with tests} |
42928cde | 22 | BuildRequires: perl-Filter-Simple |
23 | BuildRequires: perl-Parse-RecDescent | |
24 | %endif | |
25 | BuildArch: noarch | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
0a26c0b0 JB |
29 | This module, when inherited by a package, allows that package's class |
30 | to define attribute handler subroutines for specific attributes. | |
31 | Variables and subroutines subsequently defined in that package, or in | |
32 | packages derived from that package may be given attributes with the | |
33 | same names as the attribute handler subroutines, which will then be | |
34 | called at the end of the compilation phase (i.e. in an INIT block). | |
35 | ||
a39b82c5 JR |
36 | %description -l pl.UTF-8 |
37 | Ten moduł, w przypadku dziedziczenia po nim w pakiecie, pozwala klasie | |
38 | pakietu definiować funkcje obsługi atrybutów dla danych atrybutów. | |
0a26c0b0 | 39 | Zmienne i funkcje zdefiniowane w tym pakiecie lub pakietach |
a39b82c5 JR |
40 | wywodzących się z niego mogą mieć podane atrybuty o tych samych |
41 | nazwach co funkcje obsługujące atrybuty, które będą wtedy wywoływane | |
42 | na końcu fazy kompilacji (czyli w bloku INIT). | |
42928cde | 43 | |
44 | %prep | |
45 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
46 | ||
47 | %build | |
3d94bdf9 | 48 | %{__perl} Makefile.PL \ |
039c6286 | 49 | INSTALLDIRS=vendor |
42928cde | 50 | %{__make} |
51 | ||
e53bd4ff | 52 | %{?with_tests:%{__make} test} |
42928cde | 53 | |
54 | %install | |
55 | rm -rf $RPM_BUILD_ROOT | |
42928cde | 56 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
9588cf97 | 57 | |
58 | %{__make} install \ | |
59 | DESTDIR=$RPM_BUILD_ROOT | |
42928cde | 60 | cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
61 | ||
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %doc Change* README | |
3d94bdf9 | 68 | %dir %{perl_vendorlib}/Attribute/Handlers |
69 | %{perl_vendorlib}/Attribute/Handlers/*.pm | |
42928cde | 70 | %{_mandir}/man3/* |
71 | %{_examplesdir}/%{name}-%{version} |