#!/usr/bin/make -f

export DH_GOLANG_INSTALL_EXTRA = docs/sources

%:
	dh $@ --buildsystem=golang --with=golang,bash-completion,systemd

PB_GO_FILES = $(patsubst %.proto, %.pb.go, $(wildcard */*.proto))
$(PB_GO_FILES):
	protoc -I$(dir $@) --go_out=plugins=grpc:$(dir $@) $(@:.pb.go=.proto)

override_dh_auto_configure: $(PB_GO_FILES)
	dh_auto_configure
