]>
Commit | Line | Data |
---|---|---|
e0ea52b2 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) | |
4 | ||
5 | # not yet available on x32 (ocaml 4.02.1), update when upstream will support it | |
6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 | |
7 | %undefine with_ocaml_opt | |
8 | %endif | |
9 | ||
10 | Summary: Generation of bin_prot readers and writers from types | |
11 | Summary(pl.UTF-8): Generowanie funkcji odczytujących i zapisujących bin_prot z typów | |
12 | Name: ocaml-ppx_bin_prot | |
13 | Version: 0.14.0 | |
14 | Release: 1 | |
15 | License: MIT | |
16 | Group: Libraries | |
17 | #Source0Download: https://github.com/janestreet/ppx_bin_prot/tags | |
18 | Source0: https://github.com/janestreet/ppx_bin_prot/archive/v%{version}/ppx_bin_prot-%{version}.tar.gz | |
19 | # Source0-md5: de707369a339cd359897a161b70485b5 | |
20 | URL: https://github.com/janestreet/ppx_bin_prot | |
21 | BuildRequires: ocaml >= 1:4.04.2 | |
22 | BuildRequires: ocaml-base-devel >= 0.14 | |
23 | BuildRequires: ocaml-base-devel < 0.15 | |
24 | BuildRequires: ocaml-bin_prot-devel >= 0.14 | |
25 | BuildRequires: ocaml-bin_prot-devel < 0.15 | |
26 | BuildRequires: ocaml-dune >= 2.0.0 | |
27 | BuildRequires: ocaml-ppx_here-devel >= 0.14 | |
28 | BuildRequires: ocaml-ppxlib-devel >= 0.11.0 | |
29 | %requires_eq ocaml-runtime | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %define debug_package %{nil} | |
33 | ||
34 | %description | |
35 | Generation of binary serialization and deserialization functions from | |
36 | type definitions. | |
37 | ||
38 | This package contains files needed to run bytecode executables using | |
39 | ppx_bin_prot library. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | Generowanie funkcji binarnej serializacji i deserializacji z definicji | |
43 | typów. | |
44 | ||
45 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
46 | używających biblioteki ppx_bin_prot. | |
47 | ||
48 | %package devel | |
49 | Summary: Generation of bin_prot readers and writers from types - development part | |
4da7c5b1 | 50 | Summary(pl.UTF-8): Generowanie funkcji odczytujących i zapisujących bin_prot z typów - część programistyczna |
e0ea52b2 JB |
51 | Group: Development/Libraries |
52 | Requires: %{name} = %{version}-%{release} | |
53 | %requires_eq ocaml | |
54 | Requires: ocaml-base-devel >= 0.14 | |
55 | Requires: ocaml-bin_prot-devel >= 0.14 | |
56 | Requires: ocaml-ppx_here-devel >= 0.14 | |
57 | Requires: ocaml-ppxlib-devel >= 0.11.0 | |
58 | ||
59 | %description devel | |
60 | This package contains files needed to develop OCaml programs using | |
61 | ppx_bin_prot library. | |
62 | ||
63 | %description devel -l pl.UTF-8 | |
64 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu | |
65 | używających biblioteki ppx_bin_prot. | |
66 | ||
67 | %prep | |
68 | %setup -q -n ppx_bin_prot-%{version} | |
69 | ||
70 | %build | |
71 | dune build --verbose | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | dune install --destdir=$RPM_BUILD_ROOT | |
77 | ||
78 | # sources | |
79 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_bin_prot/*.ml | |
80 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_bin_prot/*/*.ml | |
81 | # packaged as %doc | |
82 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/ppx_bin_prot | |
83 | ||
84 | %clean | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
89 | %doc CHANGES.md LICENSE.md README.md | |
90 | %dir %{_libdir}/ocaml/ppx_bin_prot | |
91 | %{_libdir}/ocaml/ppx_bin_prot/META | |
92 | %{_libdir}/ocaml/ppx_bin_prot/*.cma | |
93 | %dir %{_libdir}/ocaml/ppx_bin_prot/shape-expander | |
94 | %{_libdir}/ocaml/ppx_bin_prot/shape-expander/*.cma | |
95 | %if %{with ocaml_opt} | |
96 | %attr(755,root,root) %{_libdir}/ocaml/ppx_bin_prot/*.cmxs | |
97 | %attr(755,root,root) %{_libdir}/ocaml/ppx_bin_prot/shape-expander/*.cmxs | |
98 | %endif | |
99 | ||
100 | %files devel | |
101 | %defattr(644,root,root,755) | |
102 | %{_libdir}/ocaml/ppx_bin_prot/*.cmi | |
103 | %{_libdir}/ocaml/ppx_bin_prot/*.cmt | |
104 | %{_libdir}/ocaml/ppx_bin_prot/*.cmti | |
105 | %{_libdir}/ocaml/ppx_bin_prot/*.mli | |
106 | %{_libdir}/ocaml/ppx_bin_prot/shape-expander/*.cmi | |
107 | %{_libdir}/ocaml/ppx_bin_prot/shape-expander/*.cmt | |
108 | %{_libdir}/ocaml/ppx_bin_prot/shape-expander/*.cmti | |
109 | %{_libdir}/ocaml/ppx_bin_prot/shape-expander/*.mli | |
110 | %if %{with ocaml_opt} | |
111 | %{_libdir}/ocaml/ppx_bin_prot/ppx_bin_prot.a | |
112 | %{_libdir}/ocaml/ppx_bin_prot/*.cmx | |
113 | %{_libdir}/ocaml/ppx_bin_prot/*.cmxa | |
114 | %{_libdir}/ocaml/ppx_bin_prot/shape-expander/bin_shape_expand.a | |
115 | %{_libdir}/ocaml/ppx_bin_prot/shape-expander/*.cmx | |
116 | %{_libdir}/ocaml/ppx_bin_prot/shape-expander/*.cmxa | |
117 | %endif | |
118 | %{_libdir}/ocaml/ppx_bin_prot/dune-package | |
119 | %{_libdir}/ocaml/ppx_bin_prot/opam |