#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_test:

override_dh_installchangelogs:
	dh_installchangelogs RELEASE-NOTES.adoc

# Upstream POMs use the Maven ${revision} property for the project version.
# Replace it with the upstream version before mh_patchpoms runs, so both it
# and debian-maven-plugin see the reified JAR version.
override_dh_auto_configure:
	/usr/share/maven-debian-helper/copy-repo.sh debian
	find . -name pom.xml -exec sed -i \
		's|<version>$${revision}</version>|<version>$(DEB_VERSION_UPSTREAM)</version>|' {} +
	mh_patchpoms -pliblog4j2-java --debian-build --keep-pom-version \
		--maven-repo=$(CURDIR)/debian/maven-repo
	touch debian/stamp-poms-patched
