| 1 |
|
| 2 |
|
| 3 |
include /usr/share/dpkg/pkg-info.mk |
| 4 |
|
| 5 |
export DH_GOLANG_EXCLUDES := benchmark |
| 6 |
|
| 7 |
PKG=github.com/awslabs/soci-snapshotter |
| 8 |
VERSION = $(DEB_VERSION_UPSTREAM_REVISION) |
| 9 |
REVISION = $(DEB_VERSION) |
| 10 |
|
| 11 |
GO_LDFLAGS = -ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) $(GO_EXTRA_LDFLAGS)' |
| 12 |
|
| 13 |
%: |
| 14 |
dh $@ --builddirectory=_build --buildsystem=golang |
| 15 |
|
| 16 |
|
| 17 |
override_dh_auto_build: |
| 18 |
dh_auto_build --builddirectory=_build -- $(GO_LDFLAGS) |
| 19 |
|
| 20 |
override_dh_auto_test: |
| 21 |
dh_auto_test --builddirectory=_build -- $(GO_LDFLAGS) |
| 22 |
|