#!/usr/bin/make -f

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

PACKAGE := jsr305
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')

%:
	dh $@ --with javahelper

override_jh_build:
	jh_build jsr305.jar ri/src

override_dh_auto_clean:
	dh_auto_clean
	mh_clean

get-orig-source:
	cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \
	./debian/orig-tar.sh

override_jh_installlibs:
	mh_installpoms -plib$(PACKAGE)-java
	mh_installjar -plib$(PACKAGE)-java --usj-version=$(DEB_UPSTREAM_VERSION) \
		-l ri/pom.xml $(PACKAGE).jar 

