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