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