This patch adds a --libdir option to opam-installer so it installs the plugin in the specified directory rather than in the default one (ocaml's directory in the store, which is forbidden). diff -aur package.pristine/Makefile package.new/Makefile --- package.pristine/Makefile 2016-02-06 01:55:14.650150309 +0100 +++ package.new/Makefile 2016-02-06 01:57:56.012174364 +0100 @@ -29,26 +29,26 @@ ocaml -I js-utils js-utils/gen_install.ml install: $(NAME).install - opam-installer -i --prefix $(PREFIX) $(NAME).install + opam-installer -i --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install uninstall: $(NAME).install - opam-installer -u --prefix $(PREFIX) $(NAME).install + opam-installer -u --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install reinstall: $(NAME).install - opam-installer -u --prefix $(PREFIX) $(NAME).install &> /dev/null || true - opam-installer -i --prefix $(PREFIX) $(NAME).install + opam-installer -u --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install &> /dev/null || true + opam-installer -i --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install bin.tar.gz: $(NAME).install rm -rf _install mkdir _install - opam-installer -i --prefix _install $(NAME).install + opam-installer -i --prefix _install --libdir $(LIBDIR) $(NAME).install tar czf bin.tar.gz -C _install . rm -rf _install bin.lzo: $(NAME).install rm -rf _install mkdir _install - opam-installer -i --prefix _install $(NAME).install + opam-installer -i --prefix _install --libdir $(LIBDIR) $(NAME).install cd _install && lzop -1 -P -o ../bin.lzo `find . -type f` rm -rf _install