#!/usr/bin/make -f

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

export CLASSPATH=/usr/share/jaba/jaxb-api.jar:/usr/share/java/jaxb-impl.jar:/usr/share/java/commons-cli.jar:/usr/share/java/commons-lang.jar:/usr/share/java/commons-io.jar
export LC_ALL=C.UTF-8

%:
	dh $@ --with javahelper

override_dh_auto_clean:
	rm -rf lib build *.jar junit-tmp.xml TEST-*.xml
	(test -e test && find test -name '*.class' -delete) || true

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cp debian/junit.xml ./junit-tmp.xml
	ant -f junit-tmp.xml junit
endif

override_dh_clean:
	dh_clean
	rm -f debian/*.log

override_dh_auto_build:
	jh_build --javacopts="-encoding UTF8" rdp-readseq.jar src
	cd src ; jar uf ../rdp-readseq.jar data
