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