File debian.rules of Package shim

#!/usr/bin/make -f
export DEB_BUILD_OPTIONS=nocheck
export PATH:=/usr/src/packages/BUILD/local/go/bin:$(PATH)
export GOROOT:=/usr/src/packages/BUILD/local/go
export GOPATH=/usr/src/packages/BUILD/go

GO_VERSION=1.12.3

%:
	dh $@

override_dh_auto_build:
	mkdir -p /usr/src/packages/BUILD/local/
	mkdir -p /usr/src/packages/BUILD/go/src/github.com/kata-containers/
	tar xzf /usr/src/packages/SOURCES/go$(GO_VERSION).linux-amd64.tar.gz -C /usr/src/packages/BUILD/local/
	ln -s /usr/src/packages/BUILD/ /usr/src/packages/BUILD/go/src/github.com/kata-containers/shim
	cd $(GOPATH)/src/github.com/kata-containers/shim && make COMMIT=7e0e427

override_dh_auto_install:
	mkdir -p debian/kata-shim
	make install LIBEXECDIR=$(shell pwd)/debian/kata-shim/usr/libexec COMMIT=7e0e427