#!/usr/bin/make -f
# -*- makefile -*-

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

DESTDIR=$(CURDIR)/debian/tmp

include /usr/share/dpkg/pkg-info.mk
include /usr/share/ocaml/ocamlvars.mk

OCAMLFIND_LDCONF=ignore
export OCAMLFIND_LDCONF

%:
	dh $@ --with ocaml

override_dh_auto_build:
	dune build -p google-drive-ocamlfuse

override_dh_auto_test:
	true

override_dh_auto_install:
	mkdir -p $(DESTDIR)/usr/bin
	cp -Lv _build/install/default/bin/google-drive-ocamlfuse $(DESTDIR)/usr/bin

override_dh_auto_clean:
	rm -rf _build/

debian/google-drive-ocamlfuse.1: debian/google-drive-ocamlfuse.mkd
	pandoc -s -w man $^ -o $@

# No dbgsym packages:
override_dh_strip:
	dh_strip --no-automatic-dbgsym
