# -*- makefile -*-

# The debian/local/ directory contains some auxilliary sources that
# according to upstream does not yet make sense to package into Debian
# because they are a work in progress, but are still required to build
# this package.  We ship them as vendored files in debian/local/ until
# things have been resolved.

# You may update this code by running:
#
# make -f debian/README.source refresh

.PHONY: refresh ssh-tpm-ca-authority

refresh: ssh-tpm-ca-authority

clean:
	rm -rfv debian/local

STCA=debian/local/ssh-tpm-ca-authority
ssh-tpm-ca-authority:
	mkdir -pv $(STCA)/attest $(STCA)/client $(STCA)/internal $(STCA)/internal/json $(STCA)/oidc
	wget -nv -O debian/local/ssh-tpm-ca-authority/LICENCE 'https://raw.githubusercontent.com/Foxboron/ssh-tpm-ca-authority/refs/heads/master/LICENCE'
	wget -nv -O debian/local/ssh-tpm-ca-authority/oidc/oidc.go 'https://raw.githubusercontent.com/Foxboron/ssh-tpm-ca-authority/refs/heads/master/oidc/oidc.go'
	wget -nv -O debian/local/ssh-tpm-ca-authority/internal/json/json.go 'https://raw.githubusercontent.com/Foxboron/ssh-tpm-ca-authority/refs/heads/master/internal/json/json.go'
	wget -nv -O debian/local/ssh-tpm-ca-authority/client/client.go 'https://raw.githubusercontent.com/Foxboron/ssh-tpm-ca-authority/refs/heads/master/client/client.go'
	wget -nv -O debian/local/ssh-tpm-ca-authority/attest/attest.go 'https://raw.githubusercontent.com/Foxboron/ssh-tpm-ca-authority/refs/heads/master/attest/attest.go'
