#!/usr/bin/make -f

# Offline build with vendored dependencies
export GOPROXY := off
export GOFLAGS := -mod=vendor

# Only build the main syft command
export DH_GOLANG_BUILDPKG := github.com/anchore/syft/cmd/syft

%:
	dh $@ --buildsystem=golang --with=golang

override_dh_auto_build:
	go build -buildmode=pie -o obj-x86_64-linux-gnu/bin/syft ./cmd/syft

override_dh_auto_install:
	dh_auto_install -- --no-source

override_dh_auto_test:
	# Tests require network access

override_dh_golang:
	# Skip - Go embed directives fail in dh_golang's copied source tree
