3 %bcond_without tests # do not perform "make test"
7 Summary: CBOR::XS - Concise Binary Object Representation (CBOR, RFC7049)
8 Summary(pl.UTF-8): CBOR::XS - Concise Binary Object Representation (CBOR, RFC7049)
14 License: GPL v1+ or Artistic
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-authors/id/M/ML/MLEHMANN/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5: dfe163f8b9d9a890a445bced9cba1cca
18 URL: http://search.cpan.org/dist/CBOR-XS/
19 BuildRequires: perl-Canary-Stability
20 BuildRequires: perl-devel >= 1:5.8.0
21 BuildRequires: rpm-perlprov >= 4.1-13
23 BuildRequires: perl-Encode
24 BuildRequires: perl-Types-Serialiser
25 BuildRequires: perl-common-sense
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 This module converts Perl data structures to the Concise Binary Object
31 Representation (CBOR) and vice versa. CBOR is a fast binary
32 serialisation format that aims to use an (almost) superset of the JSON
33 data model, i.e. when you can represent something useful in JSON, you
34 should be able to represent it in CBOR.
36 In short, CBOR is a faster and quite compact binary alternative to
37 JSON, with the added ability of supporting serialisation of Perl
38 objects. (JSON often compresses better than CBOR though, so if you
39 plan to compress the data later and speed is less important you might
40 want to compare both formats first).
42 %description -l pl.UTF-8
43 Ten moduł konwertuje struktury danych Perla do formatu CBOR (Concise
44 Binary Object Representation) i odwrotnie. CBOR jest szybkim binarnym
45 formatem serializacji, którego celem jest używanie nadzbioru
46 możliwości JSONa, tzn. gdy coś da się reprezentować w
47 formacie JSON, da się również to zrobić w formacie CBOR.
49 W skrócie, CBOR jest szybszą i bardziej kompaktową alternatywą
50 dla formatu JSON, z możliwością wspierania serializacji obiektów
51 Perla. Jednakże, często JSON lepiej się kompresuje niż CBOR,
52 więc jeżeli planujesz kompresować później dane, a prędkość
53 nie jest istotna, możesz chcieć najpierw porównać oba formaty.
56 %setup -q -n %{pdir}-%{pnam}-%{version}
59 export PERL_CANARY_STABILITY_NOPROMPT=1
60 %{__perl} Makefile.PL \
64 OPTIMIZE="%{rpmcflags}"
66 %{?with_tests:%{__make} test}
69 rm -rf $RPM_BUILD_ROOT
71 DESTDIR=$RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
76 rm -rf $RPM_BUILD_ROOT
79 %defattr(644,root,root,755)
81 %dir %{perl_vendorarch}/CBOR
82 %{perl_vendorarch}/CBOR/XS.pm
83 %dir %{perl_vendorarch}/auto/CBOR
84 %dir %{perl_vendorarch}/auto/CBOR/XS
85 %attr(755,root,root) %{perl_vendorarch}/auto/CBOR/XS/*.so
86 %{_mandir}/man3/CBOR::XS.3pm*
87 %{_examplesdir}/%{name}-%{version}