#!/usr/bin/make -f
export DH_VERBOSE = 1

%:
	dh $@

NIMCACHE=$(CURDIR)/tests/nimcache

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	nim c --nimcache:$(NIMCACHE) tests/test1.nim
endif

override_dh_installexamples:
#	Additional packages are required that are beyond the scope of this package
#	see debian/TODO
	echo "I: Not installing examples until these are functional within Debian"

override_dh_installdocs:
	# nim has path problem, needs to wait for nim update
	#nim doc --project --index:on --outdir:docs src/d3.nim
	#nim buildIndex -o:docs/theindex.html docs
	dh_installdocs

override_dh_auto_clean:
	dh_auto_clean
	rm -rf docs
	find examples -type f -a -executable | xargs -r rm -f
	rm -rf $(NIMCACHE) tests/test1
