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: 3f14fccc36dd6b852390831a3f2b4137
20 URL: https://github.com/ocaml/dune
21 BuildRequires: ocaml >= 3.04-7
22 %requires_eq ocaml-runtime
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define debug_package %{nil}
26 %if %{without ocaml_opt}
27 %define no_install_post_strip 1
28 # no opt means no native binary, stripping bytecode breaks such programs
29 %define _enable_debug_packages 0
33 A composable build system for OCaml.
36 %setup -q -n %{module}-%{version}
42 %{__make} -j1 release \
43 CC="%{__cc} %{rpmcflags} -fPIC"
46 rm -rf $RPM_BUILD_ROOT
49 DESTDIR=$RPM_BUILD_ROOT
52 rm -rf $RPM_BUILD_ROOT
55 %defattr(644,root,root,755)
56 %doc LICENSE.md CHANGES.md README.md
57 %attr(755,root,root) %{_bindir}/dune
58 %attr(755,root,root) %{_bindir}/jbuilder
59 %{_libdir}/ocaml/site-lib/%{module}
60 %{_mandir}/man1/dune*.1*
61 %{_mandir}/man5/dune*.5*