instead of the `mkdir` and `cp`, you can create a `profound.install` file that contains the tex file, and where you want to install it to.  See various other examples in the OPAM repository for the format.  This lets OPAM take care of the removal for you as well.