#!/usr/bin/make -f

# DH_VERBOSE := 1

DEB_VERSION := $(shell dpkg-parsechangelog --show-field Version)
VERSION := $(firstword $(subst -, ,${DEB_VERSION}))

%:
	dh $@ --with javahelper

get-orig-source:
	mkdir -p ../tarballs
	uscan --verbose --force-download --destdir ../tarballs

override_dh_auto_build:
	# build unannotated cofoja library
	ant
	mv dist/cofoja-${VERSION}.jar build/bootstrap.jar
	# rebuild using the library.
	dh_auto_build

override_dh_auto_clean:
	-rm build/bootstrap.jar
	dh_auto_clean

override_dh_auto_test:
	ant test

