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

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

export LOMIRI_PUSH_TEST_RESOURCES_ROOT := $(CURDIR)
export GODEBUG := cgocheck=0

ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
  PROJECT_DH_OPTIONS += --with migrations
endif

%:
	dh $@ --builddirectory=_build $(PROJECT_DH_OPTIONS)

override_dh_auto_configure:
	dh_auto_configure
	cp -rp exec-tool/ _build/

override_dh_auto_build:
	dh_auto_build
	dh_auto_build --buildsystem=makefile --builddirectory=_build/exec-tool

override_dh_auto_test:
	dh_auto_test --no-parallel
	dh_auto_test --no-parallel --buildsystem=makefile --builddirectory=_build/exec-tool

override_dh_auto_install:
	dh_auto_install
	dh_auto_install --buildsystem=makefile --builddirectory=_build/exec-tool
