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

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DH_MIGRATIONS = $(shell dpkg-vendor --derives-from Ubuntu && echo "--with migrations")

%:
	dh $@ $(DH_MIGRATIONS)

# accountsservice-ubuntu-schemas is used by the migration script, as AS requires
# the old interfaces to access the old data.
SUBST_VAR = $(shell \
	dpkg-vendor --derives-from Ubuntu \
		&& echo '-Vaccountsservice-ubuntu-schemas="accountsservice-ubuntu-schemas"' \
		|| echo '-Vaccountsservice-ubuntu-schemas=""')

override_dh_gencontrol:
	dh_gencontrol -- "$(SUBST_VAR)"
