]>
Commit | Line | Data |
---|---|---|
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 | |
7 | Summary: JSON::XS - JSON serialising/deserialising, done correctly and fast | |
3ffb4723 | 8 | Summary(pl.UTF-8): JSON::XS - serializacja/deserializacja JSON wykonana poprawnie i szybko |
d06aa346 | 9 | Name: perl-JSON-XS |
ad2c3b37 | 10 | Version: 4.02 |
7ed729c1 | 11 | Release: 2 |
40e4ea37 | 12 | Epoch: 2 |
d06aa346 AF |
13 | # same as perl |
14 | License: GPL v1+ or Artistic | |
15 | Group: Development/Languages/Perl | |
cec964cc | 16 | Source0: http://www.cpan.org/modules/by-authors/id/M/ML/MLEHMANN/%{pdir}-%{pnam}-%{version}.tar.gz |
ad2c3b37 | 17 | # Source0-md5: 1a9868d08ca395366cf1d1ea99753e6c |
cec964cc | 18 | URL: http://search.cpan.org/dist/JSON-XS/ |
60c4f36e ER |
19 | BuildRequires: perl-Canary-Stability |
20 | BuildRequires: perl-devel >= 1:5.8.0 | |
21 | BuildRequires: rpm-perlprov >= 4.1-13 | |
22 | %if %{with tests} | |
8b529231 | 23 | BuildRequires: perl-Encode |
502cfab7 | 24 | BuildRequires: perl-Types-Serialiser |
602d051b | 25 | BuildRequires: perl-common-sense |
60c4f36e | 26 | %endif |
d06aa346 AF |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
29 | %description | |
30 | This module converts Perl data structures to JSON and vice versa. Its | |
602d051b | 31 | primary goal is to be correct and its secondary goal is to be fast. To |
32 | reach the latter goal it was written in C. | |
d06aa346 AF |
33 | |
34 | As this is the n-th-something JSON module on CPAN, what was the reason | |
35 | to write yet another JSON module? While it seems there are many JSON | |
cec964cc JB |
36 | modules, none of them correctly handle all corner cases, and in most |
37 | cases their maintainers are unresponsive, gone missing, or not | |
38 | listening to bug reports for other reasons. | |
d06aa346 | 39 | |
cec964cc JB |
40 | %description -l pl.UTF-8 |
41 | Ten moduł konwertuje struktury danych Perla do formatu JSON i | |
42 | odwrotnie. Jego podstawowym celem jest poprawne działanie, a drugim - | |
43 | szybkość. W celu osiągnięcia tego drugiego celu został napisany w C. | |
d06aa346 | 44 | |
cec964cc JB |
45 | Jako że jest to już któryś moduł JSON w CPAN-ie, musiała istnieć jakaś |
46 | przyczyna dla napisania kolejnego modułu JSON. O ile istnieje wiele | |
47 | takich modułów, żaden z nich nie obsługiwał wszystkich skrajnych | |
48 | przypadków i w większości przypadków utrzymujący moduły nie | |
49 | odpowiadali, zaginęli lub z innych powodów nie zwracali uwagi na | |
50 | zgłoszenia błędów. | |
d06aa346 AF |
51 | |
52 | %prep | |
53 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
54 | ||
55 | %build | |
60c4f36e | 56 | export 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 | |
66 | rm -rf $RPM_BUILD_ROOT | |
d06aa346 AF |
67 | %{__make} install \ |
68 | DESTDIR=$RPM_BUILD_ROOT | |
69 | ||
70 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
60c4f36e | 71 | cp -a eg/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
d06aa346 AF |
72 | |
73 | %clean | |
74 | rm -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} |