#!/usr/bin/make -f

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 -- --with-mdns=avahi --enable-gtk-doc

execute_before_dh_auto_build:
	dh_auto_build -- -C libdmapsharing
	dh_auto_build -- -C vala
	dh_auto_build --no-parallel -- -C tests \
		dacplisten.c \
		dmapcopy.c \
		dmapserve.c \
		dpapview.c \
		test-dmap-client.c \
		test-dmap-server.c \
		$(NULL)

execute_before_dh_install:
	find debian/tmp -name '*.la' -print -delete
	find debian/tmp -name '*.a' -print -delete

# See https://bugs.debian.org/1055324
override_dh_auto_test: