]> git.pld-linux.org Git - packages/perl-JSON-XS.git/blob - perl-JSON-XS.spec
1fb3d599d7324a6ba58e99d514fedf434817f97a
[packages/perl-JSON-XS.git] / perl-JSON-XS.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4
5 %define pdir    JSON
6 %define pnam    XS
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
9 Name:           perl-JSON-XS
10 Version:        4.03
11 Release:        4
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-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
24 %if %{with tests}
25 BuildRequires:  perl-Encode
26 BuildRequires:  perl-Types-Serialiser
27 BuildRequires:  perl-common-sense
28 %endif
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
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.
35
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.
41
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.
46
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
52 zgłoszenia błędów.
53
54 %prep
55 %setup -q -n %{pdir}-%{pnam}-%{version}
56
57 %build
58 export PERL_CANARY_STABILITY_NOPROMPT=1
59 %{__perl} Makefile.PL \
60         INSTALLDIRS=vendor
61 %{__make} \
62         CC="%{__cc}" \
63         OPTIMIZE="%{rpmcflags}"
64
65 %{?with_tests:%{__make} test}
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 %{__make} install \
70         DESTDIR=$RPM_BUILD_ROOT
71
72 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73 cp -a eg/* $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 %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}
This page took 0.108023 seconds and 3 git commands to generate.