]> git.pld-linux.org Git - packages/perl-JSON-XS.git/blame - perl-JSON-XS.spec
- raw
[packages/perl-JSON-XS.git] / perl-JSON-XS.spec
CommitLineData
d06aa346
AF
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
8Summary: JSON::XS - JSON serialising/deserialising, done correctly and fast
9#Summary(pl.UTF-8):
10Name: perl-JSON-XS
11Version: 1.11
12Release: 1
13# same as perl
14License: GPL v1+ or Artistic
15Group: Development/Languages/Perl
16Source0: http://www.cpan.org/modules/by-authors/id/M/ML/MLEHMANN/JSON-XS-1.11.tar.gz
17# Source0-md5: b3cb4892921016863a2c50d64a42c874
18# generic URL, check or change before uncommenting
19#URL: http://search.cpan.org/dist/JSON-XS/
20BuildRequires: perl-devel >= 1:5.8.0
21BuildRequires: rpm-perlprov >= 4.1-13
22%if %{with tests}
23%endif
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
27This module converts Perl data structures to JSON and vice versa. Its
28primary goal is to be correct and its secondary goal is to be
29fast. To reach the latter goal it was written in C.
30
31As this is the n-th-something JSON module on CPAN, what was the reason
32to write yet another JSON module? While it seems there are many JSON
33modules, none of them correctly handle all corner cases, and in most cases
34their maintainers are unresponsive, gone missing, or not listening to bug
35reports for other reasons.
36
37See COMPARISON, below, for a comparison to some other JSON modules.
38
39See MAPPING, below, on how JSON::XS maps perl values to JSON values and
40vice versa.
41
42
43
44# %description -l pl.UTF-8
45# TODO
46
47%prep
48%setup -q -n %{pdir}-%{pnam}-%{version}
49
50%build
51%{__perl} Makefile.PL \
52 INSTALLDIRS=vendor
53%{__make} \
54 OPTIMIZE="%{rpmcflags}"
55
56%{?with_tests:%{__make} test}
57
58%install
59rm -rf $RPM_BUILD_ROOT
60
61%{__make} install \
62 DESTDIR=$RPM_BUILD_ROOT
63
64install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
65cp -a eg $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
66
67%clean
68rm -rf $RPM_BUILD_ROOT
69
70%files
71%defattr(644,root,root,755)
72%doc Changes README
73%{perl_vendorarch}/JSON/*.pm
74%dir %{perl_vendorarch}/auto/JSON/XS
75%{perl_vendorarch}/auto/JSON/XS/*.bs
76%attr(755,root,root) %{perl_vendorarch}/auto/JSON/XS/*.so
77%{_mandir}/man3/*
78%{_examplesdir}/%{name}-%{version}
This page took 0.095337 seconds and 4 git commands to generate.