#!/usr/bin/make -f
# output every command that modifies files on the build system.
export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

%:
	dh $@ --no-parallel --with=javahelper --buildsystem=maven

override_dh_auto_test:
	# don't run test with maven and illegal access to maven

override_dh_auto_build-indep:
	dh_auto_build

override_dh_auto_build-arch:
	# build the binary
	make

override_dh_auto_install-arch:
	dh_install -plibsqlite-jdbc-jni target/*/*.so usr/lib/$(DEB_HOST_MULTIARCH)/jni

override_dh_auto_install-indep:
	mh_installpom -plibsqlite-jdbc-java pom.xml
	mh_installjar -plibsqlite-jdbc-java pom.xml -l target/*.jar

override_dh_dwz:
	# dh_dwz fails with dh_dwz: dwz -q -- debian/**/libsqlitejdbc.so returned exit code 1
