3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
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
11 Summary: A composable build system for OCaml
17 Source0: https://github.com/ocaml/dune/archive/%{version}/%{module}-%{version}.tar.gz
18 # Source0-md5: 68fbc294aeed510425d20498225d416b
19 URL: https://github.com/ocaml/dune
20 BuildRequires: ocaml >= 3.04-7
21 %requires_eq ocaml-runtime
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %if %{without ocaml_opt}
25 %define no_install_post_strip 1
26 # no opt means no native binary, stripping bytecode breaks such programs
27 %define _enable_debug_packages 0
31 Dune is a build system designed for OCaml/Reason projects only. It
32 focuses on providing the user with a consistent experience and takes
33 care of most of the low-level details of OCaml compilation. All you
34 have to do is provide a description of your project and dune will do
38 %setup -q -n %{module}-%{version}
42 --libdir %{_libdir}/ocaml \
46 CC="%{__cc} %{rpmcflags} -fPIC"
51 rm -rf $RPM_BUILD_ROOT
54 DESTDIR=$RPM_BUILD_ROOT
57 rm -rf $RPM_BUILD_ROOT
60 %defattr(644,root,root,755)
61 %doc LICENSE.md CHANGES.md README.md
62 %attr(755,root,root) %{_bindir}/dune
64 %{_mandir}/man1/dune*.1*
65 %{_mandir}/man5/dune*.5*