#!/usr/bin/make -f

SCONS_FLAGS := $(subst parallel=,-j,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))

%:
	dh $@ --with python3

override_dh_auto_configure:
	@:

override_dh_auto_build:
	python3 bootstrap.py $(SCONS_FLAGS) build/scons

override_dh_auto_install:
	cd build/scons && \
	python3 setup.py install --prefix /usr --root '$(CURDIR)/debian/scons' \
		--no-version-script --standalone-lib --no-install-man --no-install-bat

override_dh_auto_clean:
	rm -rf .sconsign.dblite bootstrap build $$(find * -name __pycache__ -type d)

override_dh_installchangelogs:
	dh_installchangelogs src/CHANGES.txt
