#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_build:
	dh_auto_build

	# Build the man page
	cd man && DOKUJCLIENT_CMD='../debian/scripts/dokujclient_from_build_tree.sh' ./build_man.sh

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test

	# Test the command line tool
	CLASSPATH=target/dokujclient-3.9.1.jar debian/scripts/dokujclient --help
endif
