#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1
KUBE_LOCAL_ARTIFACTS?=

build:
	echo noop

binary:
	mkdir -p usr/bin
ifneq ($(KUBE_LOCAL_ARTIFACTS),)
	cp $(KUBE_LOCAL_ARTIFACTS)/bin/linux/{{ .GoArch }}/kubectl usr/bin/kubectl
else
	curl --fail -sSL --retry 5 \
		-o usr/bin/kubectl \
		"{{ .DownloadLinkBase }}/bin/linux/{{ .GoArch }}/kubectl"
endif
	chmod +x usr/bin/kubectl
	dh_testroot
	dh_auto_install
	dh_shlibdeps
	dh_install
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

%:
	dh $@
