]> git.pld-linux.org Git - packages/perl-MooX-late.git/blame - perl-MooX-late.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-MooX-late.git] / perl-MooX-late.spec
CommitLineData
1d40ba95
AM
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
5%define pdir MooX
6%define pnam late
1d40ba95
AM
7Summary: MooX::late - easily translate Moose code to Moo
8Name: perl-MooX-late
9Version: 0.015
10Release: 1
11# same as perl
12License: GPL v1+ or Artistic
13Group: Development/Languages/Perl
14Source0: http://www.cpan.org/modules/by-module/MooX/%{pdir}-%{pnam}-%{version}.tar.gz
15# Source0-md5: 2807107636e4a40903f1e2caff5fe529
16URL: http://search.cpan.org/dist/MooX-late/
17BuildRequires: perl-devel >= 1:5.8.0
18BuildRequires: rpm-perlprov >= 4.1-13
19%if %{with tests}
20BuildRequires: perl(Type::Utils) >= 1.000001
21BuildRequires: perl-Moo >= 1.006000
22BuildRequires: perl-Test-Fatal >= 0.010
23BuildRequires: perl-Test-Requires >= 0.06
24%endif
25BuildArch: noarch
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29Moo is a light-weight object oriented programming framework which aims
30to be compatible with Moose. It does this by detecting when Moose has
31been loaded, and automatically "inflating" its classes and roles to
32full Moose classes and roles. This way, Moo classes can consume Moose
33roles, Moose classes can extend Moo classes, and so forth.
34
35However, the surface syntax of Moo differs somewhat from Moose. For
36example the isa option when defining attributes in Moose must be
37either a string or a blessed Moose::Meta::TypeConstraint object; but
38in Moo must be a coderef. These differences in surface syntax make
39porting code from Moose to Moo potentially tricky. MooX::late provides
40some assistance by enabling a slightly more Moosey surface syntax.
41
42MooX::late does the following:
43
44Five features. It is not the aim of MooX::late to make every aspect of
45Moo behave exactly identically to Moose. It's just going after the
46low-hanging fruit. So it does five things right now, and I promise
47that future versions will never do more than seven.
48
49Previous releases of MooX::late added support for coerce => 1 and
50default => $nonref. These features have now been added to Moo itself,
51so MooX::late no longer has to deal with them.
52
53%prep
54%setup -q -n %{pdir}-%{pnam}-%{version}
55
56%build
57%{__perl} Makefile.PL \
58 INSTALLDIRS=vendor
59%{__make}
60
61%{?with_tests:%{__make} test}
62
63%install
64rm -rf $RPM_BUILD_ROOT
65
66%{__make} pure_install \
67 DESTDIR=$RPM_BUILD_ROOT
68
69install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
70cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
71
72%clean
73rm -rf $RPM_BUILD_ROOT
74
75%files
76%defattr(644,root,root,755)
77%doc Changes CREDITS INSTALL README TODO
78%{perl_vendorlib}/MooX/*.pm
79%{_mandir}/man3/*
80%{_examplesdir}/%{name}-%{version}
This page took 0.073955 seconds and 4 git commands to generate.