#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export PYBUILD_NAME = gumbo

%:
	dh $@ --with python3 --buildsystem=meson

override_dh_auto_clean:
	dh_auto_clean
	$(RM) -rfv build/
	$(RM) -rfv python/gumbo.egg-info/ .pybuild/

override_dh_auto_build:
	dh_auto_build
	dh_auto_build --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install
	dh_auto_install --buildsystem=pybuild --destdir=$(CURDIR)/debian/python3-gumbo
	# Remove tests
	find $(CURDIR)/debian/python3-gumbo -name '*_test.py' | xargs $(RM) -rfv

override_dh_installchangelogs:
	dh_installchangelogs CHANGES.md
