#!/usr/bin/make -f

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

include /usr/share/dpkg/default.mk

export JAVA_HOME=/usr/lib/jvm/default-java
# strip version prefix which was invented to avoid epoch
export UVERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed 's/^6401+x+//')

%:
	dh $@ --with javahelper

override_dh_auto_install:
	dh_auto_install
	mh_installpoms -plibtrilead-ssh2-java
	mh_installjar  -plibtrilead-ssh2-java debian/trilead-ssh2.pom trilead-ssh2.jar \
		--java-lib --usj-version=$(UVERSION)

override_dh_auto_clean:
	dh_auto_clean
	mh_clean
