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

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

%:
	dh $@ --with nodejs

override_dh_auto_configure:
	find $(CURDIR) -name '*.xml' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.html' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.gyp' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.md' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.png' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.jpg' -exec chmod a-x {} \;
	find $(CURDIR) -name '*.h' -exec chmod a-x {} \;
	chmod a-x examples/make-example-files.sh
	chmod a-x vagrant/scripts/setup-node.sh
	chmod a-x examples/make-example-files.sh
	chmod a-x vagrant/user.sh
	dh_auto_configure
	node-pre-gyp configure

override_dh_auto_build:
	node-pre-gyp build
	find $(CURDIR)/build -name 'opencv.node' -exec chmod a-x {} \;
