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