#!/usr/bin/make -f

export DH_GOLANG_GO_GENERATE := 1

%:
	dh $@ --buildsystem=golang --with=golang,systemd --parallel --builddirectory=_build

override_dh_auto_test:
	dh_auto_test -- -run=Test || true # TODO: remove "|| true" when the test suite is fixed

# Handle package name (etcd-server) != service name (etcd)
override_dh_installinit:
	dh_installinit -p etcd-server --name=etcd

# Exclude the sockets from the MD5 sum generation,
# see https://bugs.debian.org/855876
override_dh_md5sums:
	dh_md5sums --exclude="127.0.0.1:.*" --exclude="localhost:.*"
