| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DH_GOLANG_INSTALL_EXTRA := pkg/tuf/repository |
| 4 |
export DH_GOLANG_EXCLUDES := kms/hashivault kms/azure test/fuzz \ |
| 5 |
test/cliplugin/localkms |
| 6 |
|
| 7 |
%: |
| 8 |
dh $@ --builddirectory=_build --buildsystem=golang |
| 9 |
|
| 10 |
execute_before_dh_auto_build: |
| 11 |
cd _build/src/github.com/sigstore/sigstore/pkg; \ |
| 12 |
rgrep -q "github.com/theupdateframework/go-tuf/v0" tuf fulcioroots \ |
| 13 |
|| find tuf fulcioroots -type f -print0 | xargs -0 \ |
| 14 |
perl -pi -e 's,github.com/theupdateframework/go-tuf,github.com/theupdateframework/go-tuf/v0,' |
| 15 |
|
| 16 |
override_dh_auto_test: |
| 17 |
# disable tests for now |
| 18 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 19 |
# make test binaries available where the tests expect them |
| 20 |
mkdir -p -m700 $(CURDIR)/debian/tmp-home/ |
| 21 |
env \ |
| 22 |
HOME=$(CURDIR)/debian/tmp-home/.cache \ |
| 23 |
DH_GOLANG_EXCLUDES="$${DH_GOLANG_EXCLUDES}" \ |
| 24 |
dh_auto_test -v --max-parallel=2 -- -tags "$(BUILDTAGS)" |
| 25 |
rm -rf $(CURDIR)/debian/tmp-home |
| 26 |
endif |