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