]>
Commit | Line | Data |
---|---|---|
2a0e5705 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir JSON | |
6 | %define pnam MaybeXS | |
2a0e5705 | 7 | Summary: JSON::MaybeXS - Use Cpanel::JSON::XS with a fallback to JSON::XS and JSON::PP |
a785247b | 8 | Summary(pl.UTF-8): JSON::MaybeXS - używanie Cpanel::JSON::XS, a w przypadku braku JSON::XS lub JSON::PP |
2a0e5705 | 9 | Name: perl-JSON-MaybeXS |
a785247b | 10 | Version: 1.004003 |
2a0e5705 JR |
11 | Release: 1 |
12 | # same as perl | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/JSON/%{pdir}-%{pnam}-%{version}.tar.gz | |
a785247b JB |
16 | # Source0-md5: e46181e34588428d317932744597a7ab |
17 | URL: https://metacpan.org/release/JSON-MaybeXS | |
18 | BuildRequires: perl-ExtUtils-MakeMaker | |
2a0e5705 | 19 | BuildRequires: perl-devel >= 1:5.8.0 |
a785247b JB |
20 | %if %{with tests} |
21 | BuildRequires: perl-JSON-PP >= 2.27300 | |
22 | BuildRequires: perl-JSON-XS >= 3.0 | |
23 | BuildRequires: perl-Scalar-List-Utils | |
24 | BuildRequires: perl-Test-Needs >= 0.002006 | |
25 | BuildRequires: perl-Test-Simple >= 0.88 | |
26 | %endif | |
2a0e5705 | 27 | BuildRequires: rpm-perlprov >= 4.1-13 |
a785247b JB |
28 | BuildRequires: rpmbuild(macros) >= 1.745 |
29 | # not packaged yet | |
30 | #Suggests: perl-Cpanel-JSON-XS >= 2.3310 | |
2a0e5705 JR |
31 | BuildArch: noarch |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | This module first checks to see if either Cpanel::JSON::XS or JSON::XS | |
36 | is already loaded, in which case it uses that module. Otherwise it | |
37 | tries to load Cpanel::JSON::XS, then JSON::XS, then JSON::PP in order, | |
38 | and either uses the first module it finds or throws an error. | |
39 | ||
a785247b JB |
40 | %description -l pl.UTF-8 |
41 | Ten moduł najpierw sprawdza, czy moduł Cpanel::JSON::XS lub JSON::XS | |
42 | jest już załadowany, wtedy używa tego modułu. W przeciwnym wypadku | |
43 | próbuje załadować po kolei Cpanel::JSON::XS, JSON::XS oraz JSON::PP i | |
44 | używa pierwszego znalezionego modułu lub rzuca błąd. | |
2a0e5705 JR |
45 | |
46 | %prep | |
47 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
48 | ||
49 | %build | |
50 | %{__perl} Makefile.PL \ | |
51 | INSTALLDIRS=vendor | |
52 | %{__make} | |
53 | ||
54 | %{?with_tests:%{__make} test} | |
55 | ||
56 | %install | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %{__make} pure_install \ | |
60 | DESTDIR=$RPM_BUILD_ROOT | |
61 | ||
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %doc Changes README | |
a785247b JB |
68 | %{perl_vendorlib}/JSON/MaybeXS.pm |
69 | %{_mandir}/man3/JSON::MaybeXS.3pm* |