File: rules

package info (click to toggle)
golang-github-containers-storage 1.61.0%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 4,012 kB
  • sloc: sh: 636; ansic: 389; makefile: 109; awk: 12
file content (38 lines) | stat: -rwxr-xr-x 1,580 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
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/make -f

export DH_GOLANG_GO_GENERATE := 1
export DEB_BUILD_MAINT_OPTIONS := optimize=-lto
export DH_GOLANG_INSTALL_EXTRA := $(wildcard types/*.conf) VERSION

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Some tests require root privileges. Upstream provides
	# scripts to easily setup test VMs using vagrant, which
	# is not appropriate in a debian package build.
	mkdir -p -m700 $(CURDIR)/debian/tmp-home/.cache
	mkdir -p -m700 $(CURDIR)/debian/tmp-home/.config
	mkdir -p -m700 $(CURDIR)/debian/tmp-home/.local/share
	mkdir -p -m700 $(CURDIR)/debian/tmp-home/run
	env \
	  HOME=$(CURDIR)/debian/tmp-home/.cache \
	  XDG_CACHE_HOME=$(CURDIR)/debian/tmp-home/.cache \
	  XDG_CONFIG_HOME=$(CURDIR)/debian/tmp-home/.config \
	  XDG_DATA_HOME=$(CURDIR)/debian/tmp-home/.local/share \
	  XDG_RUNTIME_DIR=$(CURDIR)/debian/tmp-home/run \
	  PATH="$(CURDIR)/_output/bin:$$PATH" \
	  DH_GOLANG_EXCLUDES="drivers/aufs drivers/btrfs drivers/devmapper drivers/overlay drivers/vfs drivers/zfs pkg/archive pkg/chrootarchive pkg/idtools pkg/mount pkg/system pkg/unshare pkg/directory pkg/fileutils" \
	dh_auto_test -v
	rm -rf $(CURDIR)/debian/tmp-home
endif

%:
	dh $@ --buildsystem=golang --with=golang --ignore=bin/example

override_dh_installman:
	make -C docs GOMD2MAN=go-md2man
	dh_installman -pcontainers-storage docs/*.1 docs/*.5

# compatibility symlink
execute_after_dh_auto_install:
	mkdir -pv debian/tmp/usr/share/gocode/src/github.com/containers
	ln -svf ../../go.podman.io/storage debian/tmp/usr/share/gocode/src/github.com/containers/storage