summaryrefslogtreecommitdiff
path: root/packaging/perl-json.spec
blob: b72a789cfdb339cac15e8adf2b0ebaf0ec22eb7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Name:            perl-json
Version:         4.10
Release:         1
Summary:         JSON (JavaScript Object Notation) encoder/decoder
License:         GPL-1.0 or Artistic-1.0
Group:           Development/Tools
URL:             https://metacpan.org/dist/JSON
Source0:         %{name}-%{version}.tar.gz
Source1001:      %{name}.manifest
Source1002:      LICENSE

Requires:        perl >= 5.8.8

%description
This module is a thin wrapper for JSON::XS-compatible modules with a few
additional features. All the backend modules convert a Perl data structure
to a JSON text and vice versa. This module uses JSON::XS by default, and
when JSON::XS is not available, falls back on JSON::PP, which is in the
Perl core since 5.14. If JSON::PP is not available either, this module then
falls back on JSON::backportPP (which is actually JSON::PP in a different
.pm file) bundled in the same distribution as this module. You can also
explicitly specify to use Cpanel::JSON::XS, a fork of JSON::XS by Reini
Urban.

All these backend modules have slight incompatibilities between them,
including extra features that other modules don't support, but as long as
you use only common features (most important ones are described below),
migration from backend to backend should be reasonably easy. For details,
see each backend module you use.

%prep
%setup -q -n %{name}-%{version}
cp %{SOURCE1001} .
cp %{SOURCE1002} .

%build
perl Makefile.PL
make

%install
%perl_make_install
%remove_docs
%perl_process_packlist
%perl_gen_filelist

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.files
%manifest %{name}.manifest
%license LICENSE