#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/maven.mk
JAVA_HOME := /usr/lib/jvm/default-java

THE_DATE := $(shell date -d "$$(dpkg-parsechangelog -SDate)" +%Y-%m-%d)
DEB_MAVEN_ARGS := -Dtool.build.date=$(THE_DATE)

binary-post-install/epubcheck::
	mh_installjar -pepubcheck -l pom.xml target/epubcheck.jar
	chmod +x debian/epubcheck/usr/share/java/epubcheck.jar

debian/epubcheck.1: debian/epubcheck.1.in
	help2man --include=$< --output=$@ \
		--no-info --help-option="-help" \
			`basename $@ .1` --version-string=$(DEB_UPSTREAM_VERSION)

get-orig-source:
	uscan --download-current-version
