65 lines
2.1 KiB
RPMSpec
65 lines
2.1 KiB
RPMSpec
|
|
%global rpm_version 2.97
|
||
|
|
%global temp_version_suffix 001
|
||
|
|
|
||
|
|
Name: perl-JSON
|
||
|
|
Version: 2.97.001
|
||
|
|
Release: 6
|
||
|
|
Summary: JSON (JavaScript Object Notation) encoder/decoder
|
||
|
|
License: GPL+ or Artistic
|
||
|
|
URL: https://metacpan.org/release/JSON
|
||
|
|
Source0: https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/JSON-%{rpm_version}%{?temp_version_suffix}.tar.gz
|
||
|
|
|
||
|
|
BuildRequires: perl-generators perl perl(ExtUtils::MakeMaker) perl(Test::More)
|
||
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||
|
|
BuildArch: noarch
|
||
|
|
|
||
|
|
%{?perl_default_filter}
|
||
|
|
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}perl\\(JSON::(Backend::PP|backportPP::Boolean|Boolean|PP|PP::IncrParser)\\)
|
||
|
|
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(JSON::(backportPP|backportPP::Boolean)\\)
|
||
|
|
|
||
|
|
%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.
|
||
|
|
|
||
|
|
%package_help
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -n JSON-%{rpm_version}%{temp_version_suffix} -p1
|
||
|
|
|
||
|
|
%build
|
||
|
|
perl Makefile.PL NO_PACKLIST=1 INSTALLDIRS=vendor
|
||
|
|
make %{?_smp_mflags}
|
||
|
|
|
||
|
|
%install
|
||
|
|
make pure_install DESTDIR=$RPM_BUILD_ROOT
|
||
|
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
||
|
|
|
||
|
|
%check
|
||
|
|
make test
|
||
|
|
|
||
|
|
%files
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%doc README Changes
|
||
|
|
%{perl_vendorlib}/*.pm
|
||
|
|
%{perl_vendorlib}/JSON/*.pm
|
||
|
|
%{perl_vendorlib}/JSON/backportPP/*pm
|
||
|
|
|
||
|
|
%files help
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%{_mandir}/man3/*3*
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Fri Nov 15 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.97.001-6
|
||
|
|
- Delete macro to solve build problem
|
||
|
|
|
||
|
|
* Wed Nov 13 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.97.001-5
|
||
|
|
- Package init
|
||
|
|
|