#!/usr/bin/make -f

VERSION=$(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-)

export JAVA_HOME=/usr/lib/jvm/default-java
export CLASSPATH=/usr/share/java/jcm.jar:/usr/share/java/javax.mail.jar:/usr/share/java/swingx1.jar:/usr/share/java/commons-cli.jar

%:
	dh $@ --with javahelper

override_dh_auto_configure:
	-rm PIRL/Conductor/Notify-simple.java
	dh_auto_configure

debian/jp2info.1: debian/jp2info.1.in
	help2man --include=$< -n "dump meta information of JPEG 2000 Codestream / JP2 file" \
		--output=$@ --version-string=$(VERSION) --help-option=-h --no-info jp2info

get-orig-source:
	uscan --verbose --force-download --rename
