#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DESTDIR=$(CURDIR)/debian/tmp
include /usr/share/ocaml/ocamlvars.mk

%:
	dh $@ --with ocaml --no-parallel

override_dh_auto_build:
	dune build @install
	dune build @doc
	cd _build/default/_doc/_html/bz2/Bz2 && \
	sed -e 's|href=\"../../odoc.support/odoc.css\"|href=\"/usr/share/odoc/odoc-theme/default/odoc.css\"|' < index.html > bz2.html

override_dh_auto_install-arch:
	dune install --destdir=$(DESTDIR) \
		--prefix=/usr --libdir=$(OCAML_STDLIB_DIR)

override_dh_clean:
	dune clean
	dh_clean

override_dh_auto_test:
