#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

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

%:
	dh $@ --with javahelper --with jh_maven_repo_helper

override_dh_auto_build:
	dh_auto_build
	javadoc -windowtitle "Javadoc of json-simple" \
		-sourcepath src/main/java -d docs \
                -link /usr/share/doc/default-jdk-doc/api \
                org.json.simple

override_dh_auto_clean:
	[ ! -d target ] || dh_auto_clean
	rm -fr docs

get-orig-source:
	destdir=$(CURDIR) && \
	cd $(shell dirname $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))/.. && \
	USCAN_DESTDIR=$$destdir uscan --noconf --force-download --rename
