#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_DH_AUTORECONF_ARGS = -i

%:
	dh $@ --with gir

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-infgtk \
		--with-inftextgtk \
		--with-avahi \
		--with-libdaemon \
		--$(if $(filter libinfinity-0.7-doc,$(shell dh_listpackages)),en,dis)able-gtk-doc \
		--enable-introspection

override_dh_strip:
	dh_strip --dbgsym-migration='libinfinity-0.7-dbg (<< 0.7.1-2~)'

override_dh_makeshlibs:
	dh_makeshlibs -Xplugins

override_dh_clean:
	# Those files were shipped in the tarball and are regenerated on
	# each build.
	dh_clean docs/reference/libinfinity/tmpl/*.sgml
