]>
Commit | Line | Data |
---|---|---|
23331469 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir Sereal | |
6 | %define pnam Encoder | |
7 | %include /usr/lib/rpm/macros.perl | |
8 | Summary: Sereal::Encoder - Fast, compact, powerful binary serialization | |
9 | Name: perl-Sereal-Encoder | |
10 | Version: 3.002 | |
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-authors/id/Y/YV/YVES/Sereal-Encoder-3.002.tar.gz | |
16 | # Source0-md5: 18e88a20ae5842f98e2874557d8d525c | |
17 | URL: http://search.cpan.org/dist/Sereal-Encoder/ | |
18 | BuildRequires: perl-devel >= 1:5.8.0 | |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | %if %{with tests} | |
21 | BuildRequires: perl(Sereal::Decoder) >= 3.00 | |
22 | BuildRequires: perl-Test-LongString | |
23 | BuildRequires: perl-Test-Warn | |
24 | %endif | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | This library implements an efficient, compact-output, and feature-rich | |
29 | serializer using a binary protocol called Sereal. | |
30 | Its sister module Sereal::Decoder implements a decoder for this | |
31 | format. The two are released separately to allow for independent and | |
32 | safer upgrading. If you care greatly about performance, consider | |
33 | reading the Sereal::Performance documentation after finishing this | |
34 | document. | |
35 | ||
36 | The Sereal protocol version emitted by this encoder implementation is | |
37 | currently protocol version 3 by default. | |
38 | ||
39 | The protocol specification and many other bits of documentation | |
40 | can be found in the github repository. Right now, the specification is | |
41 | at https://github.com/Sereal/Sereal/blob/master/sereal_spec.pod, | |
42 | there is a discussion of the design objectives in | |
43 | https://github.com/Sereal/Sereal/blob/master/README.pod, and the | |
44 | output of our benchmarks can be seen at | |
45 | https://github.com/Sereal/Sereal/wiki/Sereal-Comparison-Graphs. | |
46 | For more information on getting the best performance out of Sereal, | |
47 | have a look at the /"PERFORMANCE" section below. | |
48 | ||
49 | %prep | |
50 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
51 | ||
52 | %build | |
53 | %{__perl} Makefile.PL \ | |
54 | INSTALLDIRS=vendor | |
55 | %{__make} \ | |
56 | CC="%{__cc}" \ | |
57 | OPTIMIZE="%{rpmcflags}" | |
58 | ||
59 | %{?with_tests:%{__make} test} | |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %{__make} pure_install \ | |
65 | DESTDIR=$RPM_BUILD_ROOT | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
72 | %doc Changes | |
73 | %dir %{perl_vendorarch}/Sereal | |
74 | %{perl_vendorarch}/Sereal/*.pm | |
75 | %dir %{perl_vendorarch}/Sereal/Encoder | |
76 | %{perl_vendorarch}/Sereal/Encoder/*.pm | |
77 | %dir %{perl_vendorarch}/auto/Sereal | |
78 | %dir %{perl_vendorarch}/auto/Sereal/Encoder | |
79 | %attr(755,root,root) %{perl_vendorarch}/auto/Sereal/Encoder/*.so | |
80 | %{_mandir}/man3/* |