3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
7 %define pnam Handlers-Prospective
8 Summary: Attribute::Handlers::Prospective - enhanced definition of attribute handlers
9 Summary(pl.UTF-8): Attribute::Handlers::Prospective - rozszerzona definicja obsługi atrybutów
10 Name: perl-Attribute-Handlers-Prospective
14 License: GPL v1+ or Artistic
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5: d20442ca3d7f83aacbdb15f225fdf287
18 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: perl-Filter-Simple
21 BuildRequires: perl-Parse-RecDescent
23 BuildRequires: rpm-perlprov >= 4.1-13
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 This module, when inherited by a package, allows that package's class
29 to define attribute handler subroutines for specific attributes.
30 Variables and subroutines subsequently defined in that package, or in
31 packages derived from that package may be given attributes with the
32 same names as the attribute handler subroutines, which will then be
33 called at the end of the compilation phase (i.e. in an INIT block).
35 %description -l pl.UTF-8
36 Ten moduł, w przypadku dziedziczenia po nim w pakiecie, pozwala klasie
37 pakietu definiować funkcje obsługi atrybutów dla danych atrybutów.
38 Zmienne i funkcje zdefiniowane w tym pakiecie lub pakietach
39 wywodzących się z niego mogą mieć podane atrybuty o tych samych
40 nazwach co funkcje obsługujące atrybuty, które będą wtedy wywoływane
41 na końcu fazy kompilacji (czyli w bloku INIT).
44 %setup -q -n %{pdir}-%{pnam}-%{version}
47 %{__perl} Makefile.PL \
51 %{?with_tests:%{__make} test}
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
58 DESTDIR=$RPM_BUILD_ROOT
59 cp -a demo/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
62 rm -rf $RPM_BUILD_ROOT
65 %defattr(644,root,root,755)
67 %dir %{perl_vendorlib}/Attribute/Handlers
68 %{perl_vendorlib}/Attribute/Handlers/*.pm
70 %{_examplesdir}/%{name}-%{version}