#!/usr/bin/make -f

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

%:
	dh $@ --with javahelper

override_dh_auto_clean:
	rm -f *.class *.jar
	rm -rf optimization

override_dh_auto_build:
	mkdir -p optimization
	cp *.java optimization/
	jh_build optimization.jar optimization
	rm optimization/*.java

get-orig-source:
	wget --output-document=../src.tar.Z ftp://www1.fpl.fs.fed.us/pub/optim/src.tar.Z
	# Hint: dealing with .Z compression needs a patch for devscripts
	# If you want to recreate the source you probably need to manually deal with this
	# Additional note: The ftpdownload seems to be broken most of the time
	mk-origtargz --repack --compress xz ../src.tar.Z
