diff --git a/ocaml-ocamlbuild.spec b/ocaml-ocamlbuild.spec index 2b67cbb..d32183e 100644 --- a/ocaml-ocamlbuild.spec +++ b/ocaml-ocamlbuild.spec @@ -69,6 +69,16 @@ make install \ DESTDIR=$RPM_BUILD_ROOT \ CHECK_IF_PREINSTALLED=false +# The install copies ocamlbuild & ocamlbuild.{byte or native}. +# Symlink them instead. +pushd $RPM_BUILD_ROOT/usr/bin +%ifarch %{ocaml_native_compiler} +ln -sf ocamlbuild.native ocamlbuild +%else +ln -sf ocamlbuild.byte ocamlbuild +%endif +popd + # Install the man page, which for some reason is not copied # in by the make install rule above. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/