#!/usr/bin/make -f

SHELL := /bin/bash

override_dh_auto_build:
	set -ex && \
		export CGO_ENABLED=0 && \
		go build \
			-mod vendor -buildmode pie -v \
			-ldflags "-s -w -extldflags '-static -lm'" \
			-o ./packer-plugin-ansible .

override_dh_auto_install:
	install -Dpm755 -d debian/tmp/usr/bin
	install -Dpm755 -t debian/tmp/usr/bin packer-plugin-ansible

override_dh_auto_test:

override_dh_auto_clean:

%:
	dh $@
