]>
Commit | Line | Data |
---|---|---|
d5b28b2d JR |
1 | # |
2 | # Conditional build: | |
aef024ea | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
d5b28b2d JR |
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 | %define module dune | |
11 | Summary: A composable build system for OCaml | |
aef024ea | 12 | Summary(pl.UTF-8): Składalny system budowania dla OCamla |
d5b28b2d | 13 | Name: ocaml-%{module} |
aef024ea JB |
14 | Version: 2.8.5 |
15 | Release: 1 | |
d5b28b2d JR |
16 | License: MIT |
17 | Group: Libraries | |
aef024ea JB |
18 | #Source0Download: https://github.com/ocaml/dune/releases |
19 | Source0: https://github.com/ocaml/dune/releases/download/%{version}/%{module}-%{version}.tbz | |
20 | # Source0-md5: 255315e5b7d8c48076ee2afcc314f190 | |
d5b28b2d | 21 | URL: https://github.com/ocaml/dune |
aef024ea JB |
22 | BuildRequires: ocaml >= 1:4.03.0 |
23 | BuildRequires: ocaml-csexp >= 1.3.0 | |
0a80ab3b JB |
24 | BuildRequires: python3-sphinx_rtd_theme |
25 | BuildRequires: sphinx-pdg >= 2 | |
d5b28b2d JR |
26 | %requires_eq ocaml-runtime |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
d5b28b2d | 29 | %description |
85cc6715 JR |
30 | Dune is a build system designed for OCaml/Reason projects only. It |
31 | focuses on providing the user with a consistent experience and takes | |
32 | care of most of the low-level details of OCaml compilation. All you | |
33 | have to do is provide a description of your project and dune will do | |
34 | the rest. | |
d5b28b2d | 35 | |
aef024ea JB |
36 | %description -l pl.UTF-8 |
37 | Dune to system budowania zaprojektowany wyłącznie dla projektów | |
38 | OCamla/Reasona. Skupia się na zapewnieniu użytkownikowi spójnego | |
39 | zachowania i dba o większość niskopoziomowych szczegółów kompilacji | |
40 | OCamla. Wszystko, co trzeba zrobić, to utworzenie opisu projektu, a | |
41 | dune zrobi resztę. | |
42 | ||
43 | %package devel | |
12178e23 | 44 | Summary: Development files for dune |
aef024ea | 45 | Summary(pl.UTF-8): Pliki programistyczne dune |
12178e23 | 46 | Requires: %{name} = %{version}-%{release} |
aef024ea | 47 | Requires: ocaml-csexp-devel >= 1.3.0 |
12178e23 | 48 | |
aef024ea | 49 | %description devel |
12178e23 JR |
50 | This package contains libraries and signature files for developing |
51 | applications that use dune. | |
52 | ||
aef024ea JB |
53 | %description devel -l pl.UTF-8 |
54 | Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji | |
55 | wykorzystujących dune. | |
56 | ||
d5b28b2d JR |
57 | %prep |
58 | %setup -q -n %{module}-%{version} | |
d5b28b2d JR |
59 | |
60 | %build | |
5a04a328 JR |
61 | ./configure \ |
62 | --libdir %{_libdir}/ocaml \ | |
63 | --mandir %{_mandir} | |
d5b28b2d | 64 | |
5a04a328 | 65 | %{__make} release \ |
d5b28b2d JR |
66 | CC="%{__cc} %{rpmcflags} -fPIC" |
67 | ||
12178e23 JR |
68 | ./dune.exe build @install |
69 | ||
5a04a328 JR |
70 | %{__make} doc |
71 | ||
12178e23 JR |
72 | # Relink the stublibs. See https://github.com/ocaml/dune/issues/2977. |
73 | cd _build/default/src/stdune | |
74 | ocamlmklib -g -ldopt "%{rpmldflags}" -o stdune_stubs fcntl_stubs.o | |
75 | cd - | |
76 | cd _build/default/src/dune_filesystem_stubs | |
77 | ocamlmklib -g -ldopt "%{rpmldflags}" -o dune_filesystem_stubs_stubs \ | |
78 | $(ar t libdune_filesystem_stubs_stubs.a) | |
79 | ||
d5b28b2d JR |
80 | %install |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %{__make} install \ | |
84 | DESTDIR=$RPM_BUILD_ROOT | |
85 | ||
12178e23 JR |
86 | # "make install" only installs the binary. We want the libraries, too. |
87 | ./dune.exe install --destdir $RPM_BUILD_ROOT | |
88 | ||
d5b28b2d JR |
89 | %clean |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %files | |
93 | %defattr(644,root,root,755) | |
12178e23 | 94 | %doc LICENSE.md CHANGES.md README.md MIGRATION.md doc/_build/* |
d5b28b2d | 95 | %attr(755,root,root) %{_bindir}/dune |
12178e23 JR |
96 | %dir %{_libdir}/ocaml/dune |
97 | %dir %{_libdir}/ocaml/dune-action-plugin | |
98 | %dir %{_libdir}/ocaml/dune-build-info | |
99 | %dir %{_libdir}/ocaml/dune-configurator | |
100 | %dir %{_libdir}/ocaml/dune-glob | |
101 | %dir %{_libdir}/ocaml/dune-private-libs | |
9889467a JR |
102 | %dir %{_libdir}/ocaml/dune-private-libs/cache |
103 | %dir %{_libdir}/ocaml/dune-private-libs/dune_csexp | |
12178e23 JR |
104 | %dir %{_libdir}/ocaml/dune-private-libs/dune-lang |
105 | %dir %{_libdir}/ocaml/dune-private-libs/dune_re | |
9889467a JR |
106 | %dir %{_libdir}/ocaml/dune-private-libs/dune-section |
107 | %dir %{_libdir}/ocaml/dune-private-libs/dune_util | |
108 | %dir %{_libdir}/ocaml/dune-private-libs/filesystem_stubs | |
109 | %dir %{_libdir}/ocaml/dune-private-libs/meta_parser | |
12178e23 JR |
110 | %dir %{_libdir}/ocaml/dune-private-libs/ocaml-config |
111 | %dir %{_libdir}/ocaml/dune-private-libs/stdune | |
9889467a | 112 | %dir %{_libdir}/ocaml/dune-private-libs/xdg |
12178e23 JR |
113 | %dir %{_libdir}/ocaml/dune-site |
114 | %dir %{_libdir}/ocaml/dune-site/plugins | |
115 | %{_libdir}/ocaml/dune*/META | |
116 | %{_libdir}/ocaml/dune*/*.cma | |
117 | %{_libdir}/ocaml/dune*/*.cmi | |
118 | %{_libdir}/ocaml/dune-configurator/.private | |
119 | %{_libdir}/ocaml/dune-private-libs/*/*.cma | |
120 | %{_libdir}/ocaml/dune-private-libs/*/*.cmi | |
121 | %{_libdir}/ocaml/dune-site/*/*.cma | |
122 | %{_libdir}/ocaml/dune-site/*/*.cmi | |
123 | %if %{with ocaml_opt} | |
aef024ea JB |
124 | %attr(755,root,root) %{_libdir}/ocaml/dune*/*.cmxs |
125 | %attr(755,root,root) %{_libdir}/ocaml/dune-private-libs/*/*.cmxs | |
126 | %attr(755,root,root) %{_libdir}/ocaml/dune-site/*/*.cmxs | |
f4cc696b | 127 | %endif |
12178e23 JR |
128 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllstdune_stubs.so |
129 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlldune_filesystem_stubs_stubs.so | |
d5b28b2d JR |
130 | %{_mandir}/man1/dune*.1* |
131 | %{_mandir}/man5/dune*.5* | |
12178e23 JR |
132 | |
133 | %files devel | |
134 | %defattr(644,root,root,755) | |
135 | %{_libdir}/ocaml/dune*/dune-package | |
136 | %{_libdir}/ocaml/dune*/opam | |
137 | %{_libdir}/ocaml/dune*/*.cmt | |
138 | %{_libdir}/ocaml/dune*/*.cmti | |
139 | %{_libdir}/ocaml/dune*/*.ml | |
140 | %{_libdir}/ocaml/dune*/*.mli | |
141 | %{_libdir}/ocaml/dune-private-libs/*/*.cmt | |
142 | %{_libdir}/ocaml/dune-private-libs/*/*.cmti | |
143 | %{_libdir}/ocaml/dune-private-libs/*/*.ml | |
144 | %{_libdir}/ocaml/dune-private-libs/*/*.mli | |
145 | %{_libdir}/ocaml/dune-site/*/*.cmt | |
146 | %{_libdir}/ocaml/dune-site/*/*.cmti | |
147 | %{_libdir}/ocaml/dune-site/*/*.ml | |
148 | %{_libdir}/ocaml/dune-site/*/*.mli | |
f4cc696b | 149 | %if %{with ocaml_opt} |
12178e23 JR |
150 | %{_libdir}/ocaml/dune*/*.a |
151 | %{_libdir}/ocaml/dune*/*.cmx | |
152 | %{_libdir}/ocaml/dune*/*.cmxa | |
153 | %{_libdir}/ocaml/dune-private-libs/*/*.a | |
154 | %{_libdir}/ocaml/dune-private-libs/*/*.cmx | |
155 | %{_libdir}/ocaml/dune-private-libs/*/*.cmxa | |
156 | %{_libdir}/ocaml/dune-site/*/*.a | |
157 | %{_libdir}/ocaml/dune-site/*/*.cmx | |
158 | %{_libdir}/ocaml/dune-site/*/*.cmxa | |
f4cc696b JR |
159 | %else |
160 | %{_libdir}/ocaml/dune-private-libs/filesystem_stubs/libdune_filesystem_stubs_stubs.a | |
161 | %{_libdir}/ocaml/dune-private-libs/stdune/libstdune_stubs.a | |
12178e23 | 162 | %endif |