#!/usr/bin/make -f

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

MSGPACK_MAVEN_DIR = debian/maven-repo/org/msgpack/msgpack-core/debian

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure
	mkdir --parents ${MSGPACK_MAVEN_DIR}
	test -e ${MSGPACK_MAVEN_DIR}/msgpack-core-debian.pom || \
		ln -s ../../../../../../msgpack-core/pom.xml \
		${MSGPACK_MAVEN_DIR}/msgpack-core-debian.pom
	test -e ${MSGPACK_MAVEN_DIR}/msgpack-core-debian.jar || \
		ln -s ../../../../../../msgpack-core/target/msgpack-core-$(DEB_VERSION_UPSTREAM).jar \
		${MSGPACK_MAVEN_DIR}/msgpack-core-debian.jar

override_dh_auto_clean:
	dh_auto_clean
	rm -rf debian/maven-repo
