#!/usr/bin/make -f
# debian/rules for biomaj
# Author: Olivier Sallou <olivier.sallou@irisa.fr>
# License: CeCILL

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

# This has to be exported to make some magic below work.
export DH_OPTIONS

export ANT_HOME=/usr/share/ant
JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")

%:
	dh $@ --with javahelper

override_dh_auto_build:
	ant -f usr/share/biomaj/build.xml
	javac -d usr/share/biomaj/bin usr/share/biomaj/bin/Configurator.java

override_dh_clean:
	dh_clean
	rm -rf usr/share/biomaj/build
	rm -rf usr/share/biomaj/dist
	rm -f usr/share/biomaj/lib/biomaj.jar
	rm -f usr/share/biomaj/bin/*.class

