]>
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 | |
008200d4 | 7 | %include /usr/lib/rpm/macros.perl |
d06aa346 | 8 | Summary: JSON::XS - JSON serialising/deserialising, done correctly and fast |
3ffb4723 | 9 | Summary(pl.UTF-8): JSON::XS - serializacja/deserializacja JSON wykonana poprawnie i szybko |
d06aa346 | 10 | Name: perl-JSON-XS |
ad2c3b37 | 11 | Version: 4.02 |
7ed729c1 | 12 | Release: 2 |
40e4ea37 | 13 | Epoch: 2 |
d06aa346 AF |
14 | # same as perl |
15 | License: GPL v1+ or Artistic | |
16 | Group: Development/Languages/Perl | |
cec964cc | 17 | Source0: http://www.cpan.org/modules/by-authors/id/M/ML/MLEHMANN/%{pdir}-%{pnam}-%{version}.tar.gz |
ad2c3b37 | 18 | # Source0-md5: 1a9868d08ca395366cf1d1ea99753e6c |
cec964cc | 19 | URL: http://search.cpan.org/dist/JSON-XS/ |
60c4f36e ER |
20 | BuildRequires: perl-Canary-Stability |
21 | BuildRequires: perl-devel >= 1:5.8.0 | |
22 | BuildRequires: rpm-perlprov >= 4.1-13 | |
23 | %if %{with tests} | |
8b529231 | 24 | BuildRequires: perl-Encode |
502cfab7 | 25 | BuildRequires: perl-Types-Serialiser |
602d051b | 26 | BuildRequires: perl-common-sense |
60c4f36e | 27 | %endif |
d06aa346 AF |
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 | |
602d051b | 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. | |
d06aa346 AF |
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 | |
cec964cc JB |
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. | |
d06aa346 | 40 | |
cec964cc JB |
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. | |
d06aa346 | 45 | |
cec964cc JB |
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. | |
d06aa346 AF |
52 | |
53 | %prep | |
54 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
55 | ||
56 | %build | |
60c4f36e | 57 | export PERL_CANARY_STABILITY_NOPROMPT=1 |
d06aa346 AF |
58 | %{__perl} Makefile.PL \ |
59 | INSTALLDIRS=vendor | |
60 | %{__make} \ | |
0e022f03 | 61 | CC="%{__cc}" \ |
d06aa346 AF |
62 | OPTIMIZE="%{rpmcflags}" |
63 | ||
64 | %{?with_tests:%{__make} test} | |
65 | ||
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
d06aa346 AF |
68 | %{__make} install \ |
69 | DESTDIR=$RPM_BUILD_ROOT | |
70 | ||
71 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
60c4f36e | 72 | cp -a eg/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
d06aa346 AF |
73 | |
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %files | |
78 | %defattr(644,root,root,755) | |
79 | %doc Changes README | |
b65cefa5 TP |
80 | %attr(755,root,root) %{_bindir}/json_xs |
81 | %{perl_vendorarch}/JSON/XS.pm | |
7d069ff1 | 82 | %{perl_vendorarch}/JSON/XS |
cddcb278 | 83 | %dir %{perl_vendorarch}/auto/JSON |
d06aa346 | 84 | %dir %{perl_vendorarch}/auto/JSON/XS |
d06aa346 | 85 | %attr(755,root,root) %{perl_vendorarch}/auto/JSON/XS/*.so |
60c4f36e ER |
86 | %{_mandir}/man1/json_xs.1p* |
87 | %{_mandir}/man3/JSON::XS.3pm* | |
88 | %{_mandir}/man3/JSON::XS::Boolean.3pm* | |
d06aa346 | 89 | %{_examplesdir}/%{name}-%{version} |