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

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

binaries := $(shell dh_listpackages)
extra_meson_options =

ifneq ($(filter libaccountsservice-doc,$(binaries)),)
extra_meson_options += -Dgtk_doc=true
else
extra_meson_options += -Dgtk_doc=false
endif

%:
	dh $@ --with=gir

override_dh_makeshlibs:
	dh_makeshlibs -V -- -c4

override_dh_auto_configure:
	dh_auto_configure -- \
		-Ddocbook=true \
		-Dgdmconffile=/etc/gdm3/daemon.conf \
		-Dadmin_group=sudo \
		-Dintrospection=true \
		$(extra_meson_options)
