File: rules

package info (click to toggle)
etcd 3.3.25+dfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 12,376 kB
  • sloc: sh: 2,402; makefile: 730
file content (37 lines) | stat: -rwxr-xr-x 1,335 bytes parent folder | download
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
#!/usr/bin/make -f

export DH_GOLANG_GO_GENERATE := 1
export DH_GOLANG_INSTALL_EXTRA := $(shell find . -name fixtures-expired) \
                                  $(shell find . -name fixtures)

# The ignored pkgs are aligned with upstream ./test file,
# see variables IGNORE_PKGS and INTEGRATION_PKGS in ./test
export TEST_EXCLUDES := cmd/ etcdserverpb rafttest gopath.proto v3lockpb v3electionpb \
                        integration e2e contrib functional

%:
	dh $@ --buildsystem=golang --with=golang --builddirectory=_build

override_dh_auto_test:
	DH_GOLANG_EXCLUDES="$(TEST_EXCLUDES)" dh_auto_test -O--no-parallel -- -run=Test

execute_after_dh_auto_test:
	find _build -type s -delete

execute_after_dh_auto_install:
	find debian/tmp -executable -type f -name '*.go' -exec chmod -x {} \;
	find debian/tmp -executable -type f -name '*.proto' -exec chmod -x {} \;

# 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 --with=golang --builddirectory=_build

.PHONY: build