# -*- coding: ascii; tab-width: 4 -*-
Info2: <<
Package: json-xs-pm%type_pkg[perl]
# PERL:XS
Version: 4.03
Revision: 1

Type: perl (5.16.2 5.18.2 5.18.4 5.28.2 5.30.2 5.30.3)
Distribution: <<
	(%type_pkg[perl] = 5162) 10.9,
	(%type_pkg[perl] = 5162) 10.10,
	(%type_pkg[perl] = 5162) 10.11,
	(%type_pkg[perl] = 5162) 10.12,
	(%type_pkg[perl] = 5162) 10.13
<<

Description: JSON done correctly and fast
DescDetail: <<
	This module converts Perl data structures to JSON and vice versa. Its
	primary goal is to be *correct* and its secondary goal is to be *fast*.
	To reach the latter goal it was written in C.
	
	Beginning with version 2.0 of the JSON module, when both JSON and
	JSON::XS are installed, then JSON will fall back on JSON::XS (this can
	be overridden) with no overhead due to emulation (by inheriting
	constructor and methods). If JSON::XS is not available, it will fall
	back to the compatible JSON::PP module as backend, so using JSON instead
	of JSON::XS gives you a portable JSON API that can be fast when you need
	and doesn't require a C compiler when that is a problem.
	
	As this is the n-th-something JSON module on CPAN, what was the reason
	to write yet another JSON module? While it seems there are many JSON
	modules, none of them correctly handle all corner cases, and in most
	cases their maintainers are unresponsive, gone missing, or not listening
	to bug reports for other reasons.
<<
License: Artistic/GPL
Maintainer: Daniel Johnson <daniel@daniel-johnson.org>
Homepage: https://metacpan.org/release/JSON-XS

Depends: common-sense-pm, perl%type_pkg[perl]-core, types-serialiser-pm
BuildDepends: canary-stability-pm

Source: mirror:cpan:authors/id/M/ML/MLEHMANN/JSON-XS-%v.tar.gz
Source-Checksum: SHA256(515536f45f2fa1a7e88c8824533758d0121d267ab9cb453a1b5887c8a56b9068)

CompileScript: <<
#!/bin/sh -ev
# Doesn't officially support perl higher than 5.22, so bypass the check as suggested
export PERL_CANARY_STABILITY_NOPROMPT=1
%{default_script}
<<
UpdatePOD: true
DocFiles: COPYING Changes README

InstallScript: <<
  %{default_script}
  /bin/mv %i/share/man %i/lib/perl5/%type_raw[perl]
  /bin/mv %i/bin/json_xs %i/bin/json_xs%type_pkg[perl]
<<

PostInstScript: update-alternatives --install %p/bin/json_xs json_xs %p/bin/json_xs%type_pkg[perl] %type_pkg[perl]

PreRmScript: update-alternatives --remove json_xs %p/bin/json_xs%type_pkg[perl]
<<