#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

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

%:
	dh $@ --with maven_repo_helper

override_dh_auto_test:
	# not fatal due to be sensible to border and exact version of imagemagick
	dh_auto_test || true

override_dh_auto_build:
	# Dependencies between targets seem not to be 100% correct.
	dh_auto_build --no-parallel

override_dh_link:
	dh_link
	# Creating a symlink from the JNI dir to the shared lib stored in the
	# canonical library directory
	mkdir -p debian/libjmagick7-jni/usr/lib/jni
	cd debian/libjmagick7-jni/usr/lib/jni &&\
	    ln -s ../${DEB_HOST_MULTIARCH}/libJMagick-*.so libJMagick.so
