#!/usr/bin/make -f

SPI_DIR=tooling-spi/src/main/java/org/opentest4j/reporting/tooling/spi/htmlreport/

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

override_dh_auto_clean:
	for file in ../debian/opentest4j-reporting/generated/*; do \
		rm -f "$(SPI_DIR)/$$(basename "$$file")"; \
	done
	dh_auto_clean

override_dh_auto_build:
	# Copy generated sources to the appropriate location
	cp ../debian/opentest4j-reporting/generated/* "$(SPI_DIR)/"
	dh_auto_build

override_dh_auto_test:

override_dh_auto_configure:
	dh_auto_configure $@
	rsync -Lav ../debian/built-components/ debian/ || true
