#!/usr/bin/make -f
# -*- makefile -*-

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

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		-Dbluez_backend=false \
		-Ddocs=$(if $(filter %-doc,$(shell dh_listpackages)),true,false) \
		-Dofono_backend=false \
		-Dprofiling=$(if $(filter linux,$(DEB_HOST_ARCH_OS)),true,false) \
		-Dtests=$(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),false,true)

override_dh_makeshlibs:
	dh_makeshlibs -X/backends/

override_dh_auto_test:
	dh_auto_test --no-parallel -- --timeout-multiplier 3

# We only use dh_gnome to automatically run dh_translations in Ubuntu
override_dh_gnome:
