#!/usr/bin/make -f
export GOCACHE = /tmp/gocache
export GOPATH := /usr/share/gocode
export DEB_BUILD_OPTIONS = parallel=4
export GO111MODULE=off
ifeq ($(DEB_BUILD_ARCH),sw_64)
	export GOFLAGS = -vet=off
endif

ifneq ($(DEB_BUILD_ARCH), mips64el)
	export GOBUILD_OPTIONS=-ldflags '-linkmode=external -extldflags "-pie"'
endif

%:
	dh $@ --buildsystem=makefile

override_dh_auto_install:
	cp -f misc/sysusers/deepin-daemon.conf debian/deepin-daemon.sysusers
	dh_installsysusers  --name=deepin-daemon
	dh_auto_install -- INSTALL_LOCALE_HELPER=1

override_dh_strip:
	dh_strip --dbgsym-migration=dde-api-dbg

override_dh_installsystemd:
	dh_installsystemd --no-start --no-restart-on-upgrade
