File: rules

package info (click to toggle)
kind 0.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,392 kB
  • sloc: sh: 1,900; makefile: 97; javascript: 55; xml: 9
file content (32 lines) | stat: -rwxr-xr-x 1,006 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export DH_GOLANG_EXCLUDES := images site
export DH_GOLANG_INSTALL_EXTRA := site/content/docs/user/kind-example-config.yaml

ifeq (,$(filter $(DEB_HOST_ARCH), mips mipsel mips64el))
HARDENING := -buildmode=pie -ldflags="-extldflags -Wl,-z,now,-z,relro"
endif


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

override_dh_auto_build:
	dh_auto_build -O --buildsystem=golang -- $(HARDENING)

override_dh_auto_install:
	dh_auto_install -- --no-source

override_dh_auto_test:
	# Skip tests that require opening localhost ports.
	dh_auto_test -- -skip='TestPortOrGetFreePort/No_port|TestGetFreePort/listen_on_localhost|TestIntegrationEnsureNetworkConcurrent'

execute_before_dh_installman:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	help2man debian/kind/usr/bin/kind \
		--no-info --no-discard-stderr \
		--version-string="$(DEB_VERSION_UPSTREAM)" \
		-n "Kubernetes IN Docker - local clusters for testing Kubernetes" > debian/kind.1
endif