#!/usr/bin/make -f
export DH_VERBOSE=1

DEB_CLI_API_VERSION = 2.1.0.0
DEB_CLI_ABI_VERSION = 2.1

override_dh_makeclilibs:
	dh_makeclilibs -m$(DEB_CLI_API_VERSION)

override_dh_installchangelogs:
	dh_installchangelogs RELEASE_NOTES.HTML

override_dh_auto_build:
	# we have to pass PREFIX has as there is no configure script which
	# covers that :(
	dh_auto_build -- PREFIX=/usr CSC=/usr/bin/mono-csc
	mkdir -p monodoc
	mdoc update \
		-fno-assembly-versions \
		-L$(CURDIR)/bin \
		--out=monodoc \
		*.dll
	mdoc assemble \
		--format ecma \
		--out $(CURDIR)/GData \
		./monodoc/

override_dh_auto_clean:
	dh_auto_clean
	rm -rf monodoc GData.tree GData.zip

override_dh_auto_install:
	# gar, see above
	# extra brokeness for building tests in install
	dh_auto_install -- PREFIX=/usr CSC=/usr/bin/mono-csc

# skip test-cases as they fail for some reason
override_dh_auto_test:

override_dh_installchangelogs:
	dh_installchangelogs RELEASE_NOTES.HTML

%:
	dh $@ --with=cli

