- BR sphinx for doc
[packages/ocaml-dune.git] / ocaml-dune.spec
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 %define         module  dune
11 Summary:        A composable build system for OCaml
12 Summary(pl.UTF-8):      Składalny system budowania dla OCamla
13 Name:           ocaml-%{module}
14 Version:        2.8.5
15 Release:        1
16 License:        MIT
17 Group:          Libraries
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
21 URL:            https://github.com/ocaml/dune
22 BuildRequires:  ocaml >= 1:4.03.0
23 BuildRequires:  ocaml-csexp >= 1.3.0
24 BuildRequires:  python3-sphinx_rtd_theme
25 BuildRequires:  sphinx-pdg >= 2
26 %requires_eq    ocaml-runtime
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
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.
35
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
44 Summary:        Development files for dune
45 Summary(pl.UTF-8):      Pliki programistyczne dune
46 Requires:       %{name} = %{version}-%{release}
47 Requires:       ocaml-csexp-devel >= 1.3.0
48
49 %description devel
50 This package contains libraries and signature files for developing
51 applications that use dune.
52
53 %description devel -l pl.UTF-8
54 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
55 wykorzystujących dune.
56
57 %prep
58 %setup -q -n %{module}-%{version}
59
60 %build
61 ./configure \
62         --libdir %{_libdir}/ocaml \
63         --mandir %{_mandir}
64
65 %{__make} release \
66         CC="%{__cc} %{rpmcflags} -fPIC"
67
68 ./dune.exe build @install
69
70 %{__make} doc
71
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
80 %install
81 rm -rf $RPM_BUILD_ROOT
82
83 %{__make} install \
84         DESTDIR=$RPM_BUILD_ROOT
85
86 # "make install" only installs the binary.  We want the libraries, too.
87 ./dune.exe install --destdir $RPM_BUILD_ROOT
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %files
93 %defattr(644,root,root,755)
94 %doc LICENSE.md CHANGES.md README.md MIGRATION.md doc/_build/*
95 %attr(755,root,root) %{_bindir}/dune
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
102 %dir %{_libdir}/ocaml/dune-private-libs/cache
103 %dir %{_libdir}/ocaml/dune-private-libs/dune_csexp
104 %dir %{_libdir}/ocaml/dune-private-libs/dune-lang
105 %dir %{_libdir}/ocaml/dune-private-libs/dune_re
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
110 %dir %{_libdir}/ocaml/dune-private-libs/ocaml-config
111 %dir %{_libdir}/ocaml/dune-private-libs/stdune
112 %dir %{_libdir}/ocaml/dune-private-libs/xdg
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}
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
127 %endif
128 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllstdune_stubs.so
129 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlldune_filesystem_stubs_stubs.so
130 %{_mandir}/man1/dune*.1*
131 %{_mandir}/man5/dune*.5*
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
149 %if %{with ocaml_opt}
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
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
162 %endif
This page took 0.150648 seconds and 3 git commands to generate.