#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with ocaml

override_dh_auto_clean:
	dune clean

override_dh_auto_configure:
	# do nothing

override_dh_auto_build:
	dune build -p lablgtk3,lablgtk3-sourceview3,lablgtk3-gtkspell3

override_dh_auto_install:
	DESTDIR=$(CURDIR)/debian/tmp dune install

override_dh_missing:
	dh_missing --fail-missing

override_dh_installexamples:
	dh_installexamples
	if [ -d debian/liblablgtk3-ocaml-doc/usr/share/doc/liblablgtk3-ocaml/examples ]; \
	then \
	  find debian/liblablgtk3-ocaml-doc/usr/share/doc/liblablgtk3-ocaml/examples \
	    -name .cvsignore \
	    -delete ;\
	fi

override_dh_ocaml:
	dh_ocaml --nodefined-map=liblablgtk3-ocaml-dev:GtkThread \
		--nodefined-map=liblablgtk3-ocaml-dev:Gobject \
		--nodefined-map=liblablgtk3-ocaml-dev:GtkSignal \
		--nodefined-map=liblablgtk3-ocaml-dev:Gaux \
		--nodefined-map=liblablgtk3-ocaml-dev:Gutf8
