#!/usr/bin/make -f

include /usr/share/ocaml/ocamlvars.mk

DESTDIR = $(CURDIR)/debian/tmp

%:
	dh $@ --with ocaml

override_dh_auto_build:
	dune build -p ppx_deriving_yojson --verbose

override_dh_auto_install:
	dune install --destdir=$(DESTDIR) --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR) --verbose
	rm -f $(DESTDIR)/usr/doc/ppx_deriving_yojson/LICENSE.txt

override_dh_auto_test:
	dune runtest -p ppx_deriving_yojson --verbose
