#! /usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,--as-needed

%:
	dh $@ --with gnome,python3

override_dh_auto_configure:
	PYTHON_VERSION="$(shell py3versions -vd)" \
	PYTHON="$(shell py3versions -d)" \
		dh_auto_configure

override_dh_auto_build:
	PYTHON_VERSION="$(shell py3versions -vd)" \
	PYTHON="$(shell py3versions -d)" \
		dh_auto_build

override_dh_gnome:
	dh_gnome --no-gnome-versions

override_dh_install:
	dh_install
	rm -f debian/python3-nautilus/usr/lib/*/nautilus/extensions-3.0/*.la

override_dh_installexamples:
	dh_installexamples -A examples/*.py examples/README

override_dh_makeshlibs:
	dh_makeshlibs -ppython3-nautilus --no-act
