File: rules

package info (click to toggle)
golang-github-mmcloughlin-avo 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 15,024 kB
  • sloc: xml: 71,029; asm: 14,862; sh: 194; makefile: 21; ansic: 11
file content (34 lines) | stat: -rwxr-xr-x 1,002 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
#!/usr/bin/make -f

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

export DH_GOLANG_INSTALL_EXTRA := \
	internal/cmd/docgen/templates \
	internal/data \
	tests/thirdparty/suite.json

export DH_GOLANG_EXCLUDES := \
	examples \
	internal/cmd

ifeq ($(filter $(DEB_HOST_ARCH), amd64),)
export DH_GOLANG_EXCLUDES += tests
endif

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

override_dh_auto_configure:
	dh_auto_configure
	# dh-golang doesn't play well with symlinks
	find _build/src/github.com/mmcloughlin/avo/ -name testdata -type l -delete -print
	cp -avT ./internal/data _build/src/github.com/mmcloughlin/avo/internal/load/testdata
	cp -avT ./internal/data _build/src/github.com/mmcloughlin/avo/internal/opcodescsv/testdata

# autopktest-pkg-go integration runs "debian/rules build", which is a no-op due
# to a script "build" present in the upstream source. This (PHONY) target
# overrides this.
build:
	dh build --buildsystem=golang --with=golang --builddirectory=_build

.PHONY: build