#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

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

UPSTREAM_TAR = icu4j-$(subst .,_,$(DEB_VERSION_UPSTREAM)).tgz

%:
	dh $@ --buildsystem=ant --with=maven-repo-helper

override_dh_auto_build:
	dh_auto_build -- jar docs -Ddoclint.option=-Xdoclint:none

override_dh_install:
	dh_install
	jh_installjavadoc

override_dh_auto_clean:
	dh_auto_clean
	jh_clean

get-orig-source: $(UPSTREAM_TAR)
	mk-origtargz --repack --compression xz $<

$(UPSTREAM_TAR):
	wget http://download.icu-project.org/files/icu4j/$(DEB_VERSION_UPSTREAM)/$@
