#!/usr/bin/make -f

export DH_GOLANG_INSTALL_EXTRA := \
	internal/data/x86.v0.2.csv \
	internal/data/x86_64.xml \
	internal/opcodescsv/testdata \
	tests/thirdparty/packages.json

include /usr/share/dpkg/pkg-info.mk

ifeq ($(filter $(DEB_TARGET_ARCH), amd64),)
export DH_GOLANG_EXCLUDES := \
	examples \
	tests/alloc/upper32 \
	tests/alloc/gp8 \
	tests/alloc/masks \
	tests/cast \
	tests/fixedbugs/issue50 \
	tests/fixedbugs/issue65 \
	tests/fixedbugs/issue68 \
	tests/fixedbugs/issue76 \
	tests/fixedbugs/issue89 \
	tests/fixedbugs/issue100/allocfail \
	tests/fixedbugs/issue100/minrepro \
	tests/fixedbugs/issue122 \
	tests/fmt \
	tests/labels \
	tests/textflag
endif

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