| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DH_GOLANG_GO_GENERATE := 1 |
| 4 |
export DH_GOLANG_EXCLUDES := \ |
| 5 |
tools \ |
| 6 |
tests/functional/cmd \ |
| 7 |
contrib \ |
| 8 |
# EOL |
| 9 |
export DH_GOLANG_INSTALL_EXTRA := \ |
| 10 |
$(shell find . -name fixtures-expired) \ |
| 11 |
$(shell find . -name fixtures) \ |
| 12 |
$(shell find . -name go.mod) \ |
| 13 |
tests/functional/functional.yaml \ |
| 14 |
# EOL |
| 15 |
|
| 16 |
%: |
| 17 |
dh $@ --buildsystem=golang --builddirectory=_build |
| 18 |
|
| 19 |
execute_after_dh_auto_build: |
| 20 |
mv -v _build/bin/server _build/bin/etcd |
| 21 |
# remove dangling symlinks. They are pointing to the "tests" package that |
| 22 |
# we exclude further up |
| 23 |
rm -vf _build/src/go.etcd.io/etcd/client/*/example_*.go |
| 24 |
|
| 25 |
override_dh_auto_test: |
| 26 |
ETCD_TEST_NO_LEAK_DETECTION=1 \ |
| 27 |
GOLANG_TEST_SHORT=true dh_auto_test -O--no-parallel -- -run=Test -short |
| 28 |
|
| 29 |
execute_after_dh_auto_test: |
| 30 |
find _build -type s -delete |
| 31 |
|
| 32 |
# Handle package name (etcd-server) != service name (etcd) |
| 33 |
override_dh_installsystemd: |
| 34 |
dh_installsystemd -p etcd-server --name=etcd |
| 35 |
|
| 36 |
# autopktest-pkg-go integration runs "debian/rules build", which is a no-op due |
| 37 |
# to a script "build" present in the upstream source. This (PHONY) target |
| 38 |
# overrides this. |
| 39 |
build: |
| 40 |
dh build --buildsystem=golang --builddirectory=_build |
| 41 |
|
| 42 |
.PHONY: build |