2014-02-24 08:35:32 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-JSON-MaybeXS
|
|
|
|
#
|
2024-08-29 07:03:40 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2014-02-24 08:35:32 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2020-05-04 05:14:28 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-02-24 08:35:32 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-10-04 18:46:22 +00:00
|
|
|
%define cpan_name JSON-MaybeXS
|
2014-02-24 08:35:32 +00:00
|
|
|
Name: perl-JSON-MaybeXS
|
2024-08-29 07:03:40 +00:00
|
|
|
Version: 1.004008
|
2014-02-24 08:35:32 +00:00
|
|
|
Release: 0
|
2018-04-20 13:44:39 +00:00
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2022-10-04 18:46:22 +00:00
|
|
|
Summary: Use Cpanel::JSON::XS with a fallback to JSON::XS and JSON::PP
|
2020-05-04 05:14:28 +00:00
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz
|
2016-09-16 06:54:17 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:14:55 +02:00
|
|
|
Source100: README.md
|
2014-02-24 08:35:32 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2024-08-29 07:03:40 +00:00
|
|
|
BuildRequires: perl(JSON::PP) >= 2.27
|
2014-02-24 08:35:32 +00:00
|
|
|
BuildRequires: perl(Test::More) >= 0.88
|
2020-05-20 04:34:16 +00:00
|
|
|
BuildRequires: perl(Test::Needs) >= 0.002006
|
2024-08-29 07:03:40 +00:00
|
|
|
Requires: perl(JSON::PP) >= 2.27
|
2016-10-05 13:08:58 +00:00
|
|
|
Recommends: perl(Cpanel::JSON::XS) >= 2.3310
|
2014-02-24 08:35:32 +00:00
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
2020-05-20 04:34:16 +00:00
|
|
|
This module first checks to see if either Cpanel::JSON::XS or JSON::XS (at
|
|
|
|
at least version 3.0) is already loaded, in which case it uses that module.
|
|
|
|
Otherwise it tries to load Cpanel::JSON::XS, then JSON::XS, then JSON::PP
|
|
|
|
in order, and either uses the first module it finds or throws an error.
|
2014-02-24 08:35:32 +00:00
|
|
|
|
|
|
|
It then exports the 'encode_json' and 'decode_json' functions from the
|
|
|
|
loaded module, along with a 'JSON' constant that returns the class name for
|
|
|
|
calling 'new' on.
|
|
|
|
|
2016-09-16 06:54:17 +00:00
|
|
|
If you're writing fresh code rather than replacing JSON.pm usage, you might
|
2014-02-24 08:35:32 +00:00
|
|
|
want to pass options as constructor args rather than calling mutators, so
|
|
|
|
we provide our own 'new' method that supports that.
|
|
|
|
|
|
|
|
%prep
|
2022-10-04 18:46:22 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{version}
|
2014-02-24 08:35:32 +00:00
|
|
|
|
|
|
|
%build
|
2020-05-04 05:14:28 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
2022-10-04 18:46:22 +00:00
|
|
|
%make_build
|
2014-02-24 08:35:32 +00:00
|
|
|
|
|
|
|
%check
|
2020-05-04 05:14:28 +00:00
|
|
|
make test
|
2014-02-24 08:35:32 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%doc Changes README
|
2020-05-04 05:14:28 +00:00
|
|
|
%license LICENSE
|
2014-02-24 08:35:32 +00:00
|
|
|
|
|
|
|
%changelog
|