| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 4 |
|
| 5 |
# Include version number |
| 6 |
include /usr/share/dpkg/pkg-info.mk |
| 7 |
VERSION = $(shell echo $(DEB_VERSION) | cut -d+ -f1) |
| 8 |
LDFLAGS := '-X main.Build=$(VERSION)' |
| 9 |
|
| 10 |
# gvisor based service library is somewhat experimental, |
| 11 |
# see https://github.com/slackhq/nebula/pull/965 |
| 12 |
# Also, it fails on s390x |
| 13 |
SKIP_TESTS += TestService |
| 14 |
|
| 15 |
%: |
| 16 |
dh $@ --buildsystem=golang |
| 17 |
|
| 18 |
override_dh_auto_build: |
| 19 |
dh_auto_build --buildsystem=golang -- -ldflags $(LDFLAGS) |
| 20 |
|
| 21 |
execute_after_dh_auto_build: |
| 22 |
rm -fv $(CURDIR)/_build/bin/go_service |
| 23 |
|
| 24 |
override_dh_auto_test: |
| 25 |
dh_auto_test --buildsystem=golang -- -skip "$(subst $(eval ) ,|,$(SKIP_TESTS))" |