File: rules

package info (click to toggle)
golang-github-containers-buildah 1.28.2%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,320 kB
  • sloc: sh: 2,291; makefile: 218; perl: 187; awk: 12; ansic: 1
file content (34 lines) | stat: -rwxr-xr-x 1,460 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
33
34
#!/usr/bin/make -f

# We want to ship only the library packages themselves in the go source, not
# the accompanying test scripts
export DH_GOLANG_EXCLUDES := tests/
export DH_GOLANG_EXCLUDES_ALL := 1

# remove this non-sense after ubuntu's docker.io ships the vendored
# libraries in the correct folders. This is to allow auto-syncing to ubuntu
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
override_dh_auto_configure:
	# force debhelper to symlink subdirs in docker, enables workarounds below
	mkdir -p _build/src/github.com/docker _build/src/github.com/seccomp
	dh_auto_configure
	# workaround some vendoring issues - in ubuntu all docker vendored libraries
	# are installed in the "vendor/" subdirectory
	test -d _build/src/github.com/docker/libnetwork || \
	  ln -s docker/vendor/github.com/docker/libnetwork \
	     _build/src/github.com/docker
	test -d _build/src/github.com/seccomp/libseccomp-golang || \
	  ln -s ../docker/docker/vendor/github.com/seccomp/libseccomp-golang \
	  _build/src/github.com/seccomp
endif

override_dh_auto_build: $(MANPAGES) $(MANPAGES5)
	dh_auto_build -- -tags "seccomp selinux apparmor"
	make -C docs docs GOMD2MAN=go-md2man
	make -C docs install PREFIX=/usr DESTDIR=$(CURDIR)/debian/tmp

override_dh_auto_test:
	DH_GOLANG_EXCLUDES="chroot cmd/buildah pkg/cli pkg/completion copier util conformance e2e" dh_auto_test

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