3 %bcond_without tests # do not perform "make test"
7 Summary: JSON::MaybeXS - Use Cpanel::JSON::XS with a fallback to JSON::XS and JSON::PP
8 Summary(pl.UTF-8): JSON::MaybeXS - używanie Cpanel::JSON::XS, a w przypadku braku JSON::XS lub JSON::PP
9 Name: perl-JSON-MaybeXS
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/JSON/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: e46181e34588428d317932744597a7ab
17 URL: https://metacpan.org/release/JSON-MaybeXS
18 BuildRequires: perl-ExtUtils-MakeMaker
19 BuildRequires: perl-devel >= 1:5.8.0
21 BuildRequires: perl-JSON-PP >= 2.27300
22 BuildRequires: perl-JSON-XS >= 3.0
23 BuildRequires: perl-Scalar-List-Utils
24 BuildRequires: perl-Test-Needs >= 0.002006
25 BuildRequires: perl-Test-Simple >= 0.88
27 BuildRequires: rpm-perlprov >= 4.1-13
28 BuildRequires: rpmbuild(macros) >= 1.745
30 #Suggests: perl-Cpanel-JSON-XS >= 2.3310
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 This module first checks to see if either Cpanel::JSON::XS or JSON::XS
36 is already loaded, in which case it uses that module. Otherwise it
37 tries to load Cpanel::JSON::XS, then JSON::XS, then JSON::PP in order,
38 and either uses the first module it finds or throws an error.
40 %description -l pl.UTF-8
41 Ten moduł najpierw sprawdza, czy moduł Cpanel::JSON::XS lub JSON::XS
42 jest już załadowany, wtedy używa tego modułu. W przeciwnym wypadku
43 próbuje załadować po kolei Cpanel::JSON::XS, JSON::XS oraz JSON::PP i
44 używa pierwszego znalezionego modułu lub rzuca błąd.
47 %setup -q -n %{pdir}-%{pnam}-%{version}
50 %{__perl} Makefile.PL \
54 %{?with_tests:%{__make} test}
57 rm -rf $RPM_BUILD_ROOT
59 %{__make} pure_install \
60 DESTDIR=$RPM_BUILD_ROOT
63 rm -rf $RPM_BUILD_ROOT
66 %defattr(644,root,root,755)
68 %{perl_vendorlib}/JSON/MaybeXS.pm
69 %{_mandir}/man3/JSON::MaybeXS.3pm*