#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk

%:
	dh $@

override_dh_installsystemd:
	dh_installsystemd --name=stratum-wireguard --no-enable --no-start --no-stop-on-upgrade stratum-wireguard.service
	dh_installsystemd --name=stratum-wireguard-sync --no-enable --no-start --no-stop-on-upgrade stratum-wireguard-sync.timer
	dh_installsystemd --name=stratum-wireguard-sync --no-enable --no-start --no-stop-on-upgrade stratum-wireguard-sync.service
	dh_installsystemd --name=stratum-wireguard-api --no-enable --no-start --no-stop-on-upgrade stratum-wireguard-api.service

override_dh_auto_build:
	mkdir -p build
	CGO_ENABLED=0 GOOS=linux GOARCH=$(DEB_HOST_ARCH) go build -trimpath -o build/module ./cmd/mesh-api

override_dh_auto_test:
	go test ./...

override_dh_auto_clean:
	rm -f build/module

override_dh_dwz:
	:
