#!/usr/bin/make -f

include /usr/share/ocaml/ocamlvars.mk

export DEB_BUILD_OPTIONS += noautodbgsym

%:
	dh $@ --with coq,ocaml

override_dh_auto_install:
	dune install rocq-equations rocq-equations-examples \
	       	--destdir=/$(CURDIR)/debian/tmp --prefix=/usr --libdir=$(OCAML_STDLIB_DIR) --mandir=/usr/share/man
	find $(CURDIR)/debian/tmp -name CHANGES.md -delete
	find $(CURDIR)/debian/tmp -name LICENSE -delete
	find $(CURDIR)/debian/tmp -name README.md -delete
	find $(CURDIR)/debian/tmp -name README.dev -delete
	rm -rf $(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)/rocq-equations-examples
	find $(CURDIR)/debian/tmp -empty -delete

	
