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

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

BUILD_GTKDOC := -Dgtk_doc=true
ifneq ($(filter nodoc, $(DEB_BUILD_OPTIONS)),)
  BUILD_GTKDOC := -Dgtk_doc=false
else
ifeq ($(shell which gtkdoc-scan),)
  BUILD_GTKDOC := -Dgtk-doc=false
endif
endif

%:
	dh $@ --with=gir

override_dh_makeshlibs:
	dh_makeshlibs -V -- -c4

override_dh_auto_configure:
	dh_auto_configure -- \
		$(BUILD_GTKDOC) -Ddocbook=true \
		-Dgdmconffile=/etc/gdm3/daemon.conf \
		-Dadmin_group=sudo \
		--libexecdir=/usr/lib/accountsservice \
		-Dsystemdsystemunitdir=/lib/systemd/system

override_dh_installchangelogs:
	dh_installchangelogs NEWS
