From f313d9c8b60eb3e31a0e4aad656f0f3d1d4252cd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 20 Sep 2017 12:33:26 +0100 Subject: [PATCH] The install copies ocamlbuild & ocamlbuild.{byte or native}. Symlink them instead. --- ocaml-ocamlbuild.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) 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/