]> git.pld-linux.org Git - packages/perl-autobox.git/blame - perl-autobox.spec
- rebuild for perl 5.20
[packages/perl-autobox.git] / perl-autobox.spec
CommitLineData
ddbcfdcc 1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
5%include /usr/lib/rpm/macros.perl
6%define pdir autobox
7Summary: autobox - call methods on native types
8Summary(pl.UTF-8): autobox - wywoływanie metod na rodzimych typach
9Name: perl-autobox
9be89a31 10Version: 2.79
121a4ad4 11Release: 2
ddbcfdcc 12# same as perl
13License: GPL v1+ or Artistic
14Group: Development/Languages/Perl
15Source0: http://search.cpan.org/CPAN/authors/id/C/CH/CHOCOLATE/autobox-%{version}.tar.gz
9be89a31 16# Source0-md5: 4718107ac4359e4300d913cc56b3e14b
ddbcfdcc 17URL: http://search.cpan.org/dist/autobox/
18BuildRequires: perl-devel >= 1:5.8.0
19BuildRequires: rpm-perlprov >= 4.1-13
20%if %{with tests}
21BuildRequires: perl-Scope-Guard >= 0.03
22%endif
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26The autobox pragma allows methods to be called on integers, floats,
27strings, arrays, hashes, and code references in exactly the same
28manner as blessed references.
29
30The autoboxing is transparent: boxed values are not blessed into their
31(user-defined) implementation class (unless the method elects to
32bestow such a blessing) - they simply use its methods as though they
33are.
34
35The classes (packages) into which the native types are boxed are fully
36configurable. By default, a method invoked on a non-object is assumed
37to be defined in a class whose name corresponds to the ref() type of
38that value - or SCALAR if the value is a non-reference.
39
40This mapping can be overriden by passing key/value pairs to the use
41autobox statement, in which the keys represent native types, and the
42values their associated classes.
43
44As with regular objects, autoboxed values are passed as the first
45argument of the specified method. Consequently, given a vanilla use
46autobox:
47
48# %description -l pl.UTF-8
49# TODO
50
51%prep
52%setup -q -n %{pdir}-%{version}
53
54%build
55%{__perl} Makefile.PL \
56 INSTALLDIRS=vendor
57%{__make} \
58 CC="%{__cc}" \
59 OPTIMIZE="%{rpmcflags}"
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
69%clean
70rm -rf $RPM_BUILD_ROOT
71
72%files
73%defattr(644,root,root,755)
74%doc Changes README
75%{perl_vendorarch}/autobox.pm
76%dir %{perl_vendorarch}/autobox
77%{perl_vendorarch}/autobox/*.pm
78%dir %{perl_vendorarch}/auto/autobox
79%{perl_vendorarch}/auto/autobox//*.bs
80%attr(755,root,root) %{perl_vendorarch}/auto/autobox//*.so
81%{_mandir}/man3/*
This page took 0.085934 seconds and 4 git commands to generate.