]> git.pld-linux.org Git - SPECS.git/blob - perl-CBOR-XS.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / perl-CBOR-XS.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4
5 %define pdir    CBOR
6 %define pnam    XS
7 Summary:        CBOR::XS - Concise Binary Object Representation (CBOR, RFC7049)
8 Summary(pl.UTF-8):      CBOR::XS - Concise Binary Object Representation (CBOR, RFC7049)
9 Name:           perl-CBOR-XS
10 Version:        1.7
11 Release:        1
12 Epoch:          2
13 # same as perl
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
22 %if %{with tests}
23 BuildRequires:  perl-Encode
24 BuildRequires:  perl-Types-Serialiser
25 BuildRequires:  perl-common-sense
26 %endif
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
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.
35
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).
41
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.
48
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.
54
55 %prep
56 %setup -q -n %{pdir}-%{pnam}-%{version}
57
58 %build
59 export PERL_CANARY_STABILITY_NOPROMPT=1
60 %{__perl} Makefile.PL \
61         INSTALLDIRS=vendor
62 %{__make} \
63         CC="%{__cc}" \
64         OPTIMIZE="%{rpmcflags}"
65
66 %{?with_tests:%{__make} test}
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 %{__make} install \
71         DESTDIR=$RPM_BUILD_ROOT
72
73 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %files
79 %defattr(644,root,root,755)
80 %doc Changes README
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}
This page took 0.728759 seconds and 3 git commands to generate.