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

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

PKGDIR=$(CURDIR)/debian/node-sqlite3/

override_dh_auto_configure:
	node-pre-gyp configure --sqlite=external --module_name=node_sqlite3

override_dh_auto_build:
	node-pre-gyp build

override_dh_auto_test:
	dh_auto_test || true

override_dh_fixperms:
	dh_fixperms
	chmod a-x $(PKGDIR)/usr/lib/nodejs/sqlite3/lib/binding/node-*/node_sqlite3.node

%:
	dh $@ --with nodejs

.PHONY: override_dh_auto_configure override_dh_auto_build \
	override_dh_fixperms override_dh_auto_test
