Move jbuilder executable to root of project

Is there an easy way to have jbuilder install an executable to the root of the package (i.e. the location of the .opam). I can do it with a shell command, but I’d prefer to use an install stanza if possible.

I’m not sure but I suggest you take a look at the documentation for opam’s install files and opam-installer itself. jbuilder’s support for installing stuff is no more than generating an appropriate .install file for opam-install to use. Once you figure that out, it should be fairly easy to translate the solution to jbuilder.

From my brief look at the docs for .opam files, there’s no section for files relative to the .opam file. Though you might be able to use a relative path from one of the known sections (e.g. bin).