#!/usr/bin/make -f

export DH_GOLANG_INSTALL_EXTRA := x509roots/fallback/bundle.der

%:
	dh $@ --builddirectory=_build --buildsystem=golang

execute_after_dh_auto_configure:
	cp -av $(CURDIR)/debian/go/src _build/src/golang.org/x/crypto/vendor

override_dh_auto_install:
	dh_auto_install -- --no-binaries

# === RUN   TestCSHAKELargeS
# panic: test timed out after 10m0s
# https://ci.debian.net/packages/g/golang-go.crypto/testing/s390x/64932024/
ifneq (,$(filter $(DEB_TARGET_ARCH), s390x))
override_dh_auto_test:
	dh_auto_test $(DH_BUILD_OPTS) -- -timeout 25m
endif
