#!/usr/bin/make -f

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

#The following prevents
#  W: tcode: incompatible-java-bytecode-format Java7 version (Class format: 51)
#See https://lists.debian.org/debian-java/2014/04/msg00117.html
export JAVA_HOME=/usr/lib/jvm/default-java

%:
	dh $@

override_dh_auto_clean:
	ant cleanbuild cleanlib cleandoc
	rm -f *.pdf *.java

override_dh_auto_build:
	ant lib -propertyfile debian/ant.properties
	ant doc -propertyfile debian/ant.properties
	test -e tcode.pdf

override_dh_fixperms:
	dh_fixperms
	chmod a+x debian/*/usr/share/tcode/*.pl
