#!/usr/bin/make -f

JAVACLASSES=/usr/share/java
JAVA_HOME=/usr/lib/jvm/default-java
export CLASSPATH=$(JAVACLASSES)/jaxen.jar:$(JAVACLASSES)/junit.jar:$(JAVACLASSES)/commons-logging.jar:$(JAVACLASSES)/xom.jar:$(JAVACLASSES)/commons-io.jar:$(JAVACLASSES)/freemarker.jar:$(JAVACLASSES)/slf4j-api.jar:$(JAVACLASSES)/slf4j-simple.jar:./jodreports-2.4.0.jar:$(JAVACLASSES)/jodreports-2.4.0.jar

create-example:
	# requires gzip and create the jodreports-wepapp as an example for libjodreports-java
	set -e; gzip -r -c jodreports-webapp/ > jodreports-webapp.gz;

%:
		dh $@ --with javahelper

override_dh_link:
	dh_link -i

override_jh_build: create-example
	jh_build jodreports-2.4.0.jar jodreports/src/main/java
	jh_build -mnet.sf.jodreports.cli.CreateDocument jodreports-cli-2.4.0.jar jodreports-cli/src/main/java
