]> git.pld-linux.org Git - packages/perl-JSON-MaybeXS.git/blame - perl-JSON-MaybeXS.spec
- new
[packages/perl-JSON-MaybeXS.git] / perl-JSON-MaybeXS.spec
CommitLineData
2a0e5705
JR
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
5%define pdir JSON
6%define pnam MaybeXS
7%include /usr/lib/rpm/macros.perl
8Summary: JSON::MaybeXS - Use Cpanel::JSON::XS with a fallback to JSON::XS and JSON::PP
9Name: perl-JSON-MaybeXS
10Version: 1.003009
11Release: 1
12# same as perl
13License: GPL v1+ or Artistic
14Group: Development/Languages/Perl
15Source0: http://www.cpan.org/modules/by-module/JSON/%{pdir}-%{pnam}-%{version}.tar.gz
16# Source0-md5: 3798c872e8988f6c903eca9f26c917d9
17URL: http://search.cpan.org/dist/JSON-MaybeXS/
18BuildRequires: perl-devel >= 1:5.8.0
19BuildRequires: rpm-perlprov >= 4.1-13
20BuildArch: noarch
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%description
24This module first checks to see if either Cpanel::JSON::XS or JSON::XS
25is already loaded, in which case it uses that module. Otherwise it
26tries to load Cpanel::JSON::XS, then JSON::XS, then JSON::PP in order,
27and either uses the first module it finds or throws an error.
28
29It then exports the encode_json and decode_json functions from the
30loaded module, along with a JSON constant that returns the class name
31for calling new on.
32
33If you're writing fresh code rather than replacing JSON.pm usage, you
34might want to pass options as constructor args rather than calling
35mutators, so we provide our own new method that supports that.
36
37%prep
38%setup -q -n %{pdir}-%{pnam}-%{version}
39
40%build
41%{__perl} Makefile.PL \
42 INSTALLDIRS=vendor
43%{__make}
44
45%{?with_tests:%{__make} test}
46
47%install
48rm -rf $RPM_BUILD_ROOT
49
50%{__make} pure_install \
51 DESTDIR=$RPM_BUILD_ROOT
52
53%clean
54rm -rf $RPM_BUILD_ROOT
55
56%files
57%defattr(644,root,root,755)
58%doc Changes README
59%{perl_vendorlib}/JSON/*.pm
60%{_mandir}/man3/*
This page took 0.078957 seconds and 4 git commands to generate.