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

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

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

%:
	dh $@

override_dh_auto_build:
	dh_auto_build --buildsystem=nodejs
	tsc -p tsconfig.build.json
	node scripts/post-build.js
	chmod +x cli.js
	help2man --no-info \
		--version-string=$(DEB_VERSION_UPSTREAM) \
		-n 'TypeScript preprocessor with source map support for Jest' \
		./cli.js > debian/ts-jest.1

override_dh_fixperms:
	dh_fixperms
	chmod +x debian/ts-jest/usr/share/nodejs/ts-jest/cli.js
	chmod -x debian/ts-jest/usr/share/nodejs/bs-logger/package.json

override_dh_installexamples:
	dh_installexamples
	find debian/ts-jest/usr/share/doc/ts-jest -name package-lock.json -delete
