]> git.pld-linux.org Git - packages/perl-JSON-XS.git/blob - perl-JSON-XS.spec
ea634dbef8e3b6c843203f9d41021609a307c4f2
[packages/perl-JSON-XS.git] / perl-JSON-XS.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %include        /usr/lib/rpm/macros.perl
6 %define pdir    JSON
7 %define pnam    XS
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
10 Name:           perl-JSON-XS
11 Version:        2.3
12 Release:        3
13 Epoch:          2
14 # same as perl
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:  4dc2a968e41f8cf330d46be12f221a12
19 URL:            http://search.cpan.org/dist/JSON-XS/
20 BuildRequires:  perl-Encode
21 BuildRequires:  perl-common-sense
22 BuildRequires:  perl-devel >= 1:5.8.0
23 BuildRequires:  rpm-perlprov >= 4.1-13
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 This module converts Perl data structures to JSON and vice versa. Its
28 primary goal is to be correct and its secondary goal is to be fast. To
29 reach the latter goal it was written in C.
30
31 As this is the n-th-something JSON module on CPAN, what was the reason
32 to write yet another JSON module? While it seems there are many JSON
33 modules, none of them correctly handle all corner cases, and in most
34 cases their maintainers are unresponsive, gone missing, or not
35 listening to bug reports for other reasons.
36
37 %description -l pl.UTF-8
38 Ten moduł konwertuje struktury danych Perla do formatu JSON i
39 odwrotnie. Jego podstawowym celem jest poprawne działanie, a drugim -
40 szybkość. W celu osiągnięcia tego drugiego celu został napisany w C.
41
42 Jako że jest to już któryś moduł JSON w CPAN-ie, musiała istnieć jakaś
43 przyczyna dla napisania kolejnego modułu JSON. O ile istnieje wiele
44 takich modułów, żaden z nich nie obsługiwał wszystkich skrajnych
45 przypadków i w większości przypadków utrzymujący moduły nie
46 odpowiadali, zaginęli lub z innych powodów nie zwracali uwagi na
47 zgłoszenia błędów.
48
49 %prep
50 %setup -q -n %{pdir}-%{pnam}-%{version}
51
52 %build
53 %{__perl} Makefile.PL \
54         INSTALLDIRS=vendor
55 %{__make} \
56         CC="%{__cc}" \
57         OPTIMIZE="%{rpmcflags}"
58
59 %{?with_tests:%{__make} test}
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63
64 %{__make} install \
65         DESTDIR=$RPM_BUILD_ROOT
66
67 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
68 cp -a eg $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %files
74 %defattr(644,root,root,755)
75 %doc Changes README
76 %attr(755,root,root) %{_bindir}/json_xs
77 %{perl_vendorarch}/JSON/XS.pm
78 %{perl_vendorarch}/JSON/XS
79 %dir %{perl_vendorarch}/auto/JSON
80 %dir %{perl_vendorarch}/auto/JSON/XS
81 %{perl_vendorarch}/auto/JSON/XS/XS.bs
82 %attr(755,root,root) %{perl_vendorarch}/auto/JSON/XS/*.so
83 %{_mandir}/man?/*
84 %{_examplesdir}/%{name}-%{version}
This page took 0.038696 seconds and 2 git commands to generate.