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