#!/usr/bin/make -f

#export DH_VERBOSE=1

export DH_GOPKG := github.com/Icinga/icingadb
export DH_GOLANG_GO_GENERATE := 1
export GO111MODULE=on
export GOPROXY=direct
export GOCACHE=/home/build/.cache/go-build

ifneq (,$(wildcard /usr/lib/go-1.11))
export PATH := /usr/lib/go-1.11/bin:$(PATH)
endif

INSTALL_DIR := install -d -m 0755
INSTALL_FILE := install -m 0644

%:
	dh $@ --buildsystem golang --with golang --with systemd

override_dh_auto_install:
	dh_auto_install -- --no-source

override_dh_auto_test:
	# Disable tests until they can work in build environment
	true

override_dh_systemd_enable:
	dh_systemd_enable --no-enable

override_dh_systemd_start:
	dh_systemd_start --no-start

# vi: noexpandtab ts=4 sw=4 :
