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

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

# Verbose output
export V=1

%:
	dh $@ --parallel

override_dh_auto_clean:
	rm -f deps/gyp/gyp
	-rmdir deps/gyp
	-rmdir deps
	rm -rf build
	dh_auto_clean

override_dh_auto_build:
	-mkdir -p deps/gyp
	-ln -s /usr/bin/gyp deps/gyp/gyp
	dh_auto_build -- release_base

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	python debian/create-raster.py
	dh_auto_test || echo "Ignoring test failures"
endif

override_dh_installexamples:
	dh_installexamples
	chmod 644 debian/*/usr/share/doc/*/examples/*/Makefile

