3 %bcond_without tests # do not perform "make test"
7 Summary: JSON::XS - JSON serialising/deserialising, done correctly and fast
8 Summary(pl.UTF-8): JSON::XS - serializacja/deserializacja JSON wykonana poprawnie i szybko
14 License: GPL v1+ or Artistic
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-module/JSON/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5: 5358225ebc9f5b74516d7585ac236086
18 URL: https://metacpan.org/release/JSON-XS
19 BuildRequires: perl-Canary-Stability
20 BuildRequires: perl-ExtUtils-MakeMaker >= 6.52
21 BuildRequires: perl-devel >= 1:5.8.3
22 BuildRequires: rpm-perlprov >= 4.1-13
23 BuildRequires: rpmbuild(macros) >= 1.745
25 BuildRequires: perl-Encode
26 BuildRequires: perl-Types-Serialiser
27 BuildRequires: perl-common-sense
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 This module converts Perl data structures to JSON and vice versa. Its
33 primary goal is to be correct and its secondary goal is to be fast. To
34 reach the latter goal it was written in C.
36 As this is the n-th-something JSON module on CPAN, what was the reason
37 to write yet another JSON module? While it seems there are many JSON
38 modules, none of them correctly handle all corner cases, and in most
39 cases their maintainers are unresponsive, gone missing, or not
40 listening to bug reports for other reasons.
42 %description -l pl.UTF-8
43 Ten moduł konwertuje struktury danych Perla do formatu JSON i
44 odwrotnie. Jego podstawowym celem jest poprawne działanie, a drugim -
45 szybkość. W celu osiągnięcia tego drugiego celu został napisany w C.
47 Jako że jest to już któryś moduł JSON w CPAN-ie, musiała istnieć jakaś
48 przyczyna dla napisania kolejnego modułu JSON. O ile istnieje wiele
49 takich modułów, żaden z nich nie obsługiwał wszystkich skrajnych
50 przypadków i w większości przypadków utrzymujący moduły nie
51 odpowiadali, zaginęli lub z innych powodów nie zwracali uwagi na
55 %setup -q -n %{pdir}-%{pnam}-%{version}
58 export PERL_CANARY_STABILITY_NOPROMPT=1
59 %{__perl} Makefile.PL \
63 OPTIMIZE="%{rpmcflags}"
65 %{?with_tests:%{__make} test}
68 rm -rf $RPM_BUILD_ROOT
70 DESTDIR=$RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73 cp -a eg/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
76 rm -rf $RPM_BUILD_ROOT
79 %defattr(644,root,root,755)
81 %attr(755,root,root) %{_bindir}/json_xs
82 %{perl_vendorarch}/JSON/XS.pm
83 %{perl_vendorarch}/JSON/XS
84 %dir %{perl_vendorarch}/auto/JSON
85 %dir %{perl_vendorarch}/auto/JSON/XS
86 %attr(755,root,root) %{perl_vendorarch}/auto/JSON/XS/*.so
87 %{_mandir}/man1/json_xs.1p*
88 %{_mandir}/man3/JSON::XS.3pm*
89 %{_mandir}/man3/JSON::XS::Boolean.3pm*
90 %{_examplesdir}/%{name}-%{version}