]>
Commit | Line | Data |
---|---|---|
7af1b8eb ER |
1 | # |
2 | # Conditional build: | |
d16a9963 | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
cb1c0896 | 4 | |
d16a9963 | 5 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
cb1c0896 JB |
6 | %undefine with_ocaml_opt |
7 | %endif | |
7af1b8eb | 8 | |
ac58557d | 9 | %define module biniou |
7af1b8eb | 10 | Summary: Flexible binary data format in OCaml |
cb1c0896 | 11 | Summary(pl.UTF-8): Elastyczny format danych binarnych dla OCamla |
ac58557d | 12 | Name: ocaml-%{module} |
50ef042f | 13 | Version: 1.2.1 |
43b87d9d | 14 | Release: 2 |
7af1b8eb ER |
15 | License: BSD |
16 | Group: Libraries | |
d16a9963 | 17 | #Source0Download: https://github.com/ocaml-community/biniou/releases |
50ef042f JR |
18 | Source0: https://github.com/ocaml-community/biniou/releases/download/%{version}/%{module}-%{version}.tbz |
19 | # Source0-md5: 07e30c58975cba31cd770a8c0df20f29 | |
20 | URL: https://github.com/ocaml-community/biniou | |
d16a9963 JB |
21 | BuildRequires: ocaml >= 1:4.02.3 |
22 | BuildRequires: ocaml-dune >= 1.10 | |
7af1b8eb ER |
23 | BuildRequires: ocaml-easy-format-devel >= 1.0.1 |
24 | BuildRequires: ocaml-findlib >= 1.4 | |
25 | %requires_eq ocaml-runtime | |
4426a420 | 26 | Requires: ocaml-easy-format >= 1.0.1 |
7af1b8eb ER |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
ac58557d ER |
29 | %define debug_package %{nil} |
30 | ||
7af1b8eb ER |
31 | %description |
32 | Biniou is a binary data format designed for speed, safety, ease of use | |
33 | and backward compatibility as protocols evolve. Biniou is vastly | |
34 | equivalent to JSON in terms of functionality but allows | |
35 | implementations about 4 times as fast (see godi-yojson for | |
36 | comparison), with 25-35% space savings. Biniou data can be decoded | |
37 | into human-readable form without knowledge of type definitions except | |
38 | for field and variant names which are represented by 31-bit hashes. | |
39 | ||
40 | %description -l pl.UTF-8 | |
cb1c0896 JB |
41 | Biniou to format danych binarnych zaprojektowany z myślą o szybkości, |
42 | bezpieczeństwie, łatwym użyciu oraz zgodności wstecznej w miarę | |
43 | ewolucji protokołów. Biniou pod względem funkcjonalnym jest bliskim | |
44 | odpowiednikiem formatu JSON, ale pozwala na implementacje około 4 razy | |
45 | szybsze (np. godi-yojson dla porównania), z oszczędnością miejsca | |
46 | rzędu 25-35%. Dane Biniou mogą być dekodowane do postaci czytelnej dla | |
47 | człowieka bez znajomości definicji typów, z wyjątkiem nazw pól i | |
48 | wariantów, które są reprezentowane jako 31-bitowe hasze. | |
7af1b8eb ER |
49 | |
50 | %package devel | |
51 | Summary: biniou binding for OCaml - development part | |
52 | Summary(pl.UTF-8): Wiązania biniou dla OCamla - cześć programistyczna | |
53 | Group: Development/Libraries | |
54 | %requires_eq ocaml | |
8c6d3f7c | 55 | Requires: %{name} = %{version}-%{release} |
4426a420 | 56 | Requires: ocaml-easy-format-devel >= 1.0.1 |
7af1b8eb ER |
57 | |
58 | %description devel | |
cb1c0896 JB |
59 | Biniou is a binary data format designed for speed, safety, ease of use |
60 | and backward compatibility as protocols evolve. Biniou is vastly | |
61 | equivalent to JSON in terms of functionality but allows | |
62 | implementations about 4 times as fast (see godi-yojson for | |
63 | comparison), with 25-35% space savings. Biniou data can be decoded | |
64 | into human-readable form without knowledge of type definitions except | |
65 | for field and variant names which are represented by 31-bit hashes. | |
66 | ||
7af1b8eb | 67 | This package contains files needed to develop OCaml programs using |
cb1c0896 | 68 | biniou library. |
7af1b8eb ER |
69 | |
70 | %description devel -l pl.UTF-8 | |
cb1c0896 JB |
71 | Biniou to format danych binarnych zaprojektowany z myślą o szybkości, |
72 | bezpieczeństwie, łatwym użyciu oraz zgodności wstecznej w miarę | |
73 | ewolucji protokołów. Biniou pod względem funkcjonalnym jest bliskim | |
74 | odpowiednikiem formatu JSON, ale pozwala na implementacje około 4 razy | |
75 | szybsze (np. godi-yojson dla porównania), z oszczędnością miejsca | |
76 | rzędu 25-35%. Dane Biniou mogą być dekodowane do postaci czytelnej dla | |
77 | człowieka bez znajomości definicji typów, z wyjątkiem nazw pól i | |
78 | wariantów, które są reprezentowane jako 31-bitowe hasze. | |
79 | ||
80 | Ten pakiet zawiera pliki niezbędne do tworzenia programów używających | |
81 | biblioteki biniou. | |
7af1b8eb ER |
82 | |
83 | %prep | |
ac58557d | 84 | %setup -q -n %{module}-%{version} |
7af1b8eb ER |
85 | |
86 | %build | |
d16a9963 | 87 | dune build --display=verbose |
7af1b8eb ER |
88 | |
89 | %install | |
90 | rm -rf $RPM_BUILD_ROOT | |
d16a9963 JB |
91 | |
92 | dune install --destdir=$RPM_BUILD_ROOT | |
93 | ||
94 | # sources | |
95 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module}/*.ml | |
96 | # packaged as %doc | |
97 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/%{module} | |
7af1b8eb | 98 | |
7af1b8eb ER |
99 | %clean |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
8c6d3f7c JR |
102 | %files |
103 | %defattr(644,root,root,755) | |
d16a9963 | 104 | %doc CHANGES.md LICENSE README.md |
8c6d3f7c | 105 | %dir %{_libdir}/ocaml/%{module} |
43b87d9d | 106 | %{_libdir}/ocaml/%{module}/META |
20df923d JB |
107 | %{_libdir}/ocaml/%{module}/biniou.cma |
108 | %if %{with ocaml_opt} | |
109 | %attr(755,root,root) %{_libdir}/ocaml/%{module}/biniou.cmxs | |
cb1c0896 | 110 | %endif |
8c6d3f7c | 111 | |
7af1b8eb ER |
112 | %files devel |
113 | %defattr(644,root,root,755) | |
d16a9963 JB |
114 | %{_libdir}/ocaml/%{module}/bi_*.cmi |
115 | %{_libdir}/ocaml/%{module}/bi_*.cmt | |
116 | %{_libdir}/ocaml/%{module}/bi_*.cmti | |
20df923d | 117 | %{_libdir}/ocaml/%{module}/bi_*.mli |
cb1c0896 | 118 | %if %{with ocaml_opt} |
bd741326 | 119 | %attr(755,root,root) %{_bindir}/bdump |
20df923d JB |
120 | %{_libdir}/ocaml/%{module}/biniou.a |
121 | %{_libdir}/ocaml/%{module}/biniou.cmxa | |
122 | %{_libdir}/ocaml/%{module}/bi_*.cmx | |
bd741326 | 123 | %endif |
43b87d9d JR |
124 | %{_libdir}/ocaml/%{module}/dune-package |
125 | %{_libdir}/ocaml/%{module}/opam |