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