#!/usr/bin/make -f

include /usr/share/dpkg/buildopts.mk

# Honour parallel=N from DEB_BUILD_OPTIONS (#1146365). Note that every
# job needs several GB of memory.
JOBS = $(or $(DEB_BUILD_OPTION_PARALLEL),1)

%:
	dh $@

before_dh_auto_clean:
	# check if debian/copyright is up-to-date
	debian/copyright.py | diff debian/copyright -

override_dh_auto_configure:
	cp build-plans.toml private-build-plans.toml

override_dh_auto_build:
	# only the unhinted TTFs are installed, so only build those
	npm run build -- ttf-unhinted::Iosevka --jCmd=$(JOBS)
	npm run build -- ttf-unhinted::IosevkaTerm --jCmd=$(JOBS)
	npm run build -- ttf-unhinted::IosevkaSlab --jCmd=$(JOBS)
