File: rules

package info (click to toggle)
docker-registry 2.7.1%2Bds2-7%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,224 kB
  • sloc: sh: 331; makefile: 78
file content (21 lines) | stat: -rwxr-xr-x 692 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
#!/usr/bin/make -f

export DH_GOLANG_GO_GENERATE := 1

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

override_dh_clean:
	dh_clean
	## Remove Files-Excluded (when built from checkout or non-DFSG tarball):
	$(RM) -rv `perl -0nE 'say $$1 if m{^Files\-Excluded\:\s*(.*?)(?:\n\n|Files:|Comment:)}sm;' debian/copyright`
	-find vendor -type d -empty -delete -print

override_dh_auto_build:
	dh_auto_build -- -ldflags '-X github.com/docker/distribution/version.Version=$(DEB_VERSION_UPSTREAM)'

override_dh_auto_test:
	# health/checks hit the internet, and thus fail
	#DH_GOLANG_EXCLUDES='distribution/registry/handlers health/checks' dh_auto_test -- -test.short

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