#!/usr/bin/make -f

DESTDIR=$(CURDIR)/debian/tmp
include /usr/share/ocaml/ocamlvars.mk
export OCAMLFIND_DESTDIR=$(DESTDIR)$(OCAML_STDLIB_DIR)

%:
	dh $@ --with ocaml

override_dh_auto_configure:

override_dh_auto_build:
	jbuilder build @install

override_dh_auto_install:
	mkdir -p '$(OCAMLFIND_DESTDIR)'
	jbuilder install --destdir=$(DESTDIR) --libdir=$(OCAMLFIND_DESTDIR) --verbose

override_dh_missing:
	dh_missing --fail-missing -X doc
