#!/usr/bin/make -f

#DH_VERBOSE=1

export JAVE_HOME=/usr/lib/jvm/default-java

%:
	dh --with javahelper $@

override_dh_auto_build:
	docbook-to-man debian/manpage.sgml > tunnelx.1
	dh_installman --verbose

override_dh_clean:
	dh_clean
	rm -f tunnelx.1
	rm -f debian/tunnelx.png
	rm -f symbols/listdir.txt
	rm -f tutorials/listdir.txt

override_jh_build:
	jh_build -o"-source 1.5"

override_dh_install:
	uudecode -o debian/tunnelx.png debian/tunnelx.png.uu
	dh_install
	ls symbols | LC_ALL=C sort > symbols/listdir.txt
	ls tutorials | LC_ALL=C sort > tutorials/listdir.txt
	jar uMf debian/tunnelx/usr/share/tunnelx/tunnelx.jar symbols/* tutorials/*
