#!/usr/bin/make -f

export PYTHON=/usr/bin/python3

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --libexecdir=/usr/lib/caribou \
		--disable-gtk2-module

override_dh_autoreconf:
	dh_autoreconf --as-needed

execute_before_dh_install:
	find debian/tmp -name '*.a' -print -delete
	find debian/tmp -name '*.la' -print -delete
	find debian/tmp -name '__pycache__' -print | xargs -r rm -rf

override_dh_makeshlibs:
	dh_makeshlibs -plibcaribou-gtk3-module --no-act
	dh_makeshlibs --remaining-packages
