3 %bcond_without tests # do not perform "make test"
7 Summary: Automatically give your module the ability to have plugins
8 Summary(pl.UTF-8): Automatyczne umożliwianie modułom posiadania wtyczek
9 Name: perl-Module-Pluggable
12 License: GPL v1+ or Artistic
13 Group: Development/Languages/Perl
14 Source0: http://www.cpan.org/modules/by-module/Module/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5: 87ce2971662efd0b69a81bb4dc9ea76c
16 URL: http://search.cpan.org/dist/Module-Pluggable/
17 BuildRequires: perl-Class-Inspector
18 BuildRequires: perl-Module-Build >= 0.38
19 %{?with_tests:BuildRequires: perl-Test-Simple >= 0.62}
20 BuildRequires: rpm-perlprov >= 4.1-13
21 Requires: perl-Module-Runtime >= 0.012
22 Requires: perl-dirs >= 1.0-5
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 Provides a simple but, hopefully, extensible way of having 'plugins'
28 for your module. Obviously this isn't going to be the be all and end
29 all of solutions but it works for me.
31 Essentially all it does is export a method into your namespace that
32 looks through a search path for .pm files and turn those into class
33 names. Optionally it instantiates those classes for you.
35 %description -l pl.UTF-8
36 Ten moduł dostarcza prosty, ale rozszerzalny sposób posiadania
37 "wtyczek" dla własnego modułu. Oczywiście nie jest to pełne i końcowe
38 rozwiązanie, ale autorowi działa.
40 Zasadniczo wszystko co robi ten moduł to wyeksportowanie metody
41 przeszukującej ścieżkę pod kątem plików .pm i zamieniającej je na
42 nazwy klas. Opcjonalnie może dziedziczyć te klasy.
45 %setup -q -n %{pdir}-%{pnam}-%{version}
48 %{__perl} Makefile.PL \
53 %{?with_tests:%{__make} test}
56 rm -rf $RPM_BUILD_ROOT
59 DESTDIR=$RPM_BUILD_ROOT
62 rm -rf $RPM_BUILD_ROOT
65 %defattr(644,root,root,755)
67 %{perl_vendorlib}/Devel/InnerPackage.pm
68 %{perl_vendorlib}/Module/Pluggable.pm
69 %dir %{perl_vendorlib}/Module
70 %dir %{perl_vendorlib}/Module/Pluggable
71 %{perl_vendorlib}/Module/Pluggable/Object.pm
72 %{_mandir}/man3/Devel::InnerPackage.3pm*
73 %{_mandir}/man3/Module::Pluggable*.3pm*