File: rules

package info (click to toggle)
golang-github-containers-common 0.56.0%2Bds1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,852 kB
  • sloc: makefile: 126; sh: 62
file content (30 lines) | stat: -rwxr-xr-x 965 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
#!/usr/bin/make -f

# get './pkg/config/containers.conf' installed
export DH_GOLANG_INSTALL_ALL := 1

# disable LTO, cf. https://wiki.debian.org/ToolChain/LTO
export DEB_BUILD_MAINT_OPTIONS := optimize=-lto

# avoid installing test utilities
export DH_GOLANG_EXCLUDES := netavark/testplugin

BUILDTAGS := containers_image_openpgp,systemd

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

override_dh_auto_build:
	dh_auto_build -v  --builddirectory=_build -- -tags "$(BUILDTAGS)"

override_dh_auto_install:
	dh_auto_install --builddirectory=_build --buildsystem=golang
	make -C docs docs GOMD2MAN=go-md2man
	make -C docs install install DESTDIR=$(CURDIR)/debian/golang-github-containers-common PREFIX=/usr

override_dh_auto_test:
	DH_GOLANG_EXCLUDES="pkg/auth pkg/ssh pkg/cgroupv2 pkg/machine pkg/config pkg/cgroups libimage pkg/secrets/passdriver libnetwork/cni libnetwork/netavark" \
	dh_auto_test

execute_after_dh_clean:
	make -C docs clean