File: rules

package info (click to toggle)
umoci 0.4.4+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,276 kB
  • sloc: sh: 347; makefile: 140; awk: 17
file content (26 lines) | stat: -rwxr-xr-x 893 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
#!/usr/bin/make -f

## Depends += gogoprotobuf golang-goprotobuf-dev
export DH_GOLANG_GO_GENERATE := 1

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

override_dh_auto_build:
	COMMIT=1 COMMIT_NO=1 $(MAKE) doc
	
	## `go generate` must run in "vendor":
	DH_GOPKG="github.com/openSUSE/umoci/vendor"    dh_auto_build -v
	
	dh_auto_build -v

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 -mindepth 1 -type d -empty -delete -printf 'removed %p\n'
	-find . -type f -name '*.generated.go' -delete -printf 'removed %p\n'     ## delete .generated.go files
	-find . -type f -name '*.pb.go' -delete -printf 'removed %p\n'            ## delete generated .pb.go files

override_dh_auto_install:
	dh_auto_install -- --no-source