Files
kata-containers/obs-packaging/shim/debian.rules-template
Jose Carlos Venegas Munoz 6396e7c6d6 pkgs: Add commit to build.
We dont have commit when we build the pkg.
Lets define the COMMIT variable to kwnow the commit from each project.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-07-04 14:30:41 -05:00

22 lines
780 B
Makefile

#!/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=@GO_VERSION@
%:
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-@GO_ARCH@.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=@HASH@
override_dh_auto_install:
mkdir -p debian/kata-shim
make install LIBEXECDIR=$(shell pwd)/debian/kata-shim/usr/libexec COMMIT=@HASH@