#!/usr/bin/make -f

export JAVA_HOME=/usr/lib/jvm/default-java
export CLASSPATH=$(shell for jar in `cat debian/classpath`; do echo -n "$${jar}:"; done)
export DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog |grep Version|awk -F": " '{print $$2}'|sed -e 's/-.*//')

%:
	dh --with javahelper $@

override_jh_build:
	jh_build --javacopts="-source 1.5 -target 1.5" --javadoc-opts="-source 1.5" \
		hibernate-jbosscache.jar src/main

get-orig-source:
	cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \
	uscan \
		--verbose \
		--no-symlink \
		--destdir $(CURDIR)      \
		--watchfile debian/watch \
		--force-download \
		--debug \
		--download-version $(DEB_UPSTREAM_VERSION) \
		--rename


