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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifneq ($(DEB_BUILD_ARCH_OS),linux)
  MM_NM_FLAGS := -D3g-source=false \
                 -Dmodem-gps-source=false \
                 -Dcdma-source=false
endif

override_dh_auto_configure:
	dh_auto_configure -- \
		-Ddbus-srv-user=geoclue \
		-Dgtk-doc=$(if $(filter %-doc,$(shell dh_listpackages)),true,false) \
		-Dsystemd-system-unit-dir=/usr/lib/systemd/system \
		${MM_NM_FLAGS}

%:
	dh $@

execute_after_dh_install-arch:
	dh_apparmor --profile-name=usr.libexec.geoclue -pgeoclue-2.0

override_dh_installchangelogs:
	dh_installchangelogs NEWS
