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

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

%:
	dh $@ --with nodejs

override_dh_auto_build:
	for m in bson mongodb-core requireoptional; do \
		cp $$m/README.md README-$$m.md; \
		cp $$m/HISTORY.md HISTORY-$$m.md; \
	done

override_dh_install:
	dh_install -Xlib/async/.eslintrc -Xlib/.DS_Store

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd requireoptional && mocha
	node index.js
endif

override_dh_installchangelogs:
	dh_installchangelogs -k HISTORY.md
