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

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

%:
	dh $@

#override_dh_auto_build:

# at least run on example
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	# smoke test
	$(CURDIR)/bin/cmd.js $(CURDIR)/example/async.js
	$(CURDIR)/bin/cmd.js $(CURDIR)/example/main.js
	# basic test
	tap -R spec test/cmd.js
else
	@echo '**********************************************************'
	@echo 'Skip test suite                                           '
	@echo '**********************************************************'
endif

override_dh_fixperms:
	dh_fixperms
	chmod +x $(CURDIR)/debian/node-brfs/usr/lib/nodejs/brfs/bin/cmd.js
