#!/usr/bin/make -f

export JAVA_HOME=/usr/lib/jvm/default-java

%:
	dh $@ --with javahelper

execute_after_dh_auto_build:
	# Compile the manual
	make -C doc/manual

	# Recreate the wrapper, because the one generated by the upstream build
	# system hardcodes path on the build machines
	sed -e "s#@JAVA@#java#;s#@ABCL_CLASSPATH@#/usr/share/java/abcl.jar#;s#@ABCL_JAVA_OPTIONS@##" < abcl.in > abcl
	chmod +x abcl

execute_after_dh_auto_clean:
	rm -f abcl
	make -C doc/manual clean
