#!/usr/bin/make -f
#export DH_GOPKG := github.com/cxnturi0n/convoC2
export HOME := $(shell pwd)
export GOOS := linux
export GOARCH := $(DEB_HOST_ARCH)
export DESTDIR := $(shell pwd)/debian/convoc2/

%:
	dh $@

override_dh_auto_configure:
	go mod vendor

override_dh_auto_build:
	mkdir -p build/server
	go build -mod=vendor -o build/server/convoc2_server_$(DEB_HOST_ARCH) cmd/server/main.go

override_dh_auto_install:
	mkdir -p $(DESTDIR)/usr/bin
	install -D -m 0755 build/server/convoc2_server_$(DEB_HOST_ARCH) $(DESTDIR)/usr/bin/convoc2
	strip $(DESTDIR)/usr/bin/convoc2


override_dh_auto_test:
