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

include /usr/share/dpkg/pkg-info.mk

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

%:
	dh $@ --with nodejs

override_dh_auto_build:
	babeljs-7 src -d dist --verbose --extensions .js,.ts --ignore '**/**/*.test.js,**/**/*.test.ts' --source-maps
	tsc --project tsconfig.types.json

override_dh_gencontrol:
	dh_gencontrol -- \
		-V"parent-module:Version=$(shell jq --raw-output .version < parent-module/package.json)~$(DEB_VERSION)" \
		-V"import-fresh:Version=$(shell jq --raw-output .version < import-fresh/package.json)~$(DEB_VERSION)"
