]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | ||
5 | %define pdir Redis | |
6 | Summary: Redis - Perl binding for Redis database | |
7 | Name: perl-Redis | |
8 | Version: 1.998 | |
9 | Release: 2 | |
10 | # note if it is "same as perl" | |
11 | License: GPL v1+ or Artistic | |
12 | Group: Development/Languages/Perl | |
13 | Source0: http://www.cpan.org/modules/by-module/Redis/%{pdir}-%{version}.tar.gz | |
14 | # Source0-md5: 187d464968fdca58eec675856a8cd0fe | |
15 | URL: http://search.cpan.org/dist/Redis/ | |
16 | BuildRequires: perl-devel >= 1:5.8.0 | |
17 | BuildRequires: rpm-perlprov >= 4.1-13 | |
18 | %if %{with tests} | |
19 | BuildRequires: perl-IO-Socket-Timeout | |
20 | BuildRequires: perl-IO-String | |
21 | BuildRequires: perl-Test-Deep | |
22 | BuildRequires: perl-Test-Exception | |
23 | BuildRequires: perl-Test-Simple >= 0.96 | |
24 | %endif | |
25 | BuildArch: noarch | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | # Tie::StdHash is present in Tie/Hash.pm package | |
29 | %define _noautoreq perl(Tie::StdHash) | |
30 | ||
31 | %description | |
32 | Pure Perl bindings for <http://redis.io/> | |
33 | ||
34 | This version supports protocol 2.x (multi-bulk) or later of Redis | |
35 | available at <https://github.com/antirez/redis/>. | |
36 | ||
37 | %prep | |
38 | %setup -q -n %{pdir}-%{version} | |
39 | ||
40 | %build | |
41 | %{__perl} Makefile.PL \ | |
42 | INSTALLDIRS=vendor | |
43 | %{__make} | |
44 | ||
45 | %{?with_tests:%{__make} test} | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | %{__make} pure_install \ | |
50 | DESTDIR=$RPM_BUILD_ROOT | |
51 | ||
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %files | |
56 | %defattr(644,root,root,755) | |
57 | %doc Changes README | |
58 | %{perl_vendorlib}/Redis.pm | |
59 | %{perl_vendorlib}/Redis | |
60 | %{_mandir}/man3/* |