#!/usr/bin/make -f

-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@ --with gnome,python3

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-plugins=all \
		--enable-python

override_dh_install:
	dh_install
	find debian/eog-plugins -name '*.la' -print -delete

override_dh_python3:
	dh_python3 --no-ext-rename /usr/lib/$(DEB_HOST_MULTIARCH)/eog/plugins

override_dh_gencontrol:
	sh debian/description.sh >> debian/eog-plugins.substvars
	dh_gencontrol
