]> git.pld-linux.org Git - packages/perl-SUPER.git/blob - perl-SUPER.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-SUPER.git] / perl-SUPER.spec
1 #
2 # Conditional build:
3 %bcond_without  autodeps        # don't BR packages needed only for resolving deps
4 %bcond_without  tests           # do not perform "make test"
5 #
6 %define pdir    SUPER
7 Summary:        SUPER - control superclass method dispatch
8 Summary(pl.UTF-8):      SUPER - przekazywanie sterowania do metod klasy nadrzÄ™dnej
9 Name:           perl-SUPER
10 Version:        1.17
11 Release:        1
12 License:        GPL v1+ or Artistic
13 Group:          Development/Languages/Perl
14 Source0:        http://www.cpan.org/modules/by-module/SUPER/%{pdir}-%{version}.tar.gz
15 # Source0-md5:  aa54aa7e9148c368091e34559587f3b2
16 URL:            http://search.cpan.org/dist/SUPER/
17 BuildRequires:  perl-devel >= 1:5.8.0
18 BuildRequires:  rpm-perlprov >= 4.1-13
19 %if %{with autodeps} || %{with tests}
20 BuildRequires:  perl-Sub-Identify
21 %endif
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 When subclassing a class, you occasionally want to dispatch control to
27 the superclass -- at least conditionally and temporarily. The Perl
28 syntax for calling your superclass is ugly and unwieldy:
29
30 $self->SUPER::method(@_);
31
32 especially when compared to its Ruby equivalent:
33
34 super;
35
36 It's even worse in that the normal Perl redispatch mechanism only
37 dispatches to the parent of the class containing the method at compile
38 time. That doesn't work very well for mixins and roles.
39
40 # %description -l pl.UTF-8
41 # TODO
42
43 %prep
44 %setup -q -n %{pdir}-%{version}
45
46 %build
47 %{__perl} Build.PL \
48         destdir=$RPM_BUILD_ROOT \
49         installdirs=vendor
50 ./Build
51
52 %{?with_tests:./Build test}
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56
57 ./Build install
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %files
63 %defattr(644,root,root,755)
64 %doc Changes README
65 %{perl_vendorlib}//*.pm
66 %{_mandir}/man3/*
This page took 0.089211 seconds and 4 git commands to generate.