File: rules

package info (click to toggle)
cadvisor 0.38.7%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,508 kB
  • sloc: ansic: 839; sh: 310; python: 101; makefile: 93
file content (28 lines) | stat: -rwxr-xr-x 745 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
#!/usr/bin/make -f

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

export DH_GOLANG_EXCLUDES := utils/cloudinfo/aws \
	utils/cloudinfo/azure utils/cloudinfo/gce \
	cmd/internal/storage/influxdb \
	example integration

export DH_GOLANG_INSTALL_EXTRA := fs/test_resources \
	$(shell find collector container perf -name '*.json')


PKG        := github.com/google/cadvisor
GO_LDFLAGS += -X $(PKG)/version.Version=$(DEB_VERSION_UPSTREAM)
GO_LDFLAGS += -X $(PKG)/version.Revision=$(DEB_VERSION)

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

execute_before_dh_auto_configure:
	cp -av debian/vendor ./

execute_after_dh_auto_install:
	mv -vf debian/tmp/usr/bin/cmd debian/tmp/usr/bin/cadvisor

override_dh_auto_build:
	dh_auto_build -- -ldflags '$(GO_LDFLAGS)'