#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk

PACKAGE              := $(DEB_SOURCE_PACKAGE)
VERSION              := $(DEB_UPSTREAM_VERSION)
JAVA_HOME            := /usr/lib/jvm/default-java

DEB_ANT_BUILDFILE    = XMPCore/build.xml
DEB_ANT_BUILD_TARGET = build


binary-post-install/$(PACKAGE)::
	mh_installpoms -p$(PACKAGE)
	mh_installjar -p$(PACKAGE) -l debian/pom.xml XMPCore/target/debug/xmpcore.jar

clean::
	mh_clean
	rm -Rf XMPCore/target XMPCore/intermediate

get-orig-source:
	-uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename --repack

get-orig-pom:
	wget -O debian/pom.xml http://repo1.maven.org/maven2/com/adobe/xmp/xmpcore/$(VERSION)/xmpcore-$(VERSION).pom
