#!/usr/bin/make -f
#export DH_VERBOSE=1
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(DEB_HOST_ARCH)
export CLASSPATH=/usr/share/java/cortado.jar:/usr/share/java/miglayout.jar:/usr/share/java/commons-cli.jar
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8

%:
	dh $@ --parallel --with javahelper --buildsystem=ant

override_dh_auto_build:
	dh_auto_build -- \
		-Dbuild.sysclasspath=only \
		package \
		online-manual \
		print-manual

override_dh_clean:
	dh_clean
	$(RM) src/MANIFEST.MF

get-orig-source:
	uscan --verbose --download-current-version --force-download --repack --compression xz
