File: rules

package info (click to toggle)
golang-github-spf13-cobra 0.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, buster-backports
  • size: 616 kB
  • sloc: makefile: 12
file content (22 lines) | stat: -rwxr-xr-x 643 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
#!/usr/bin/make -f

# Include test fixtures
export DH_GOLANG_INSTALL_EXTRA := cobra/cmd/testdata

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

# We need to add -tags to for gccgo to handle MIPS architectures where
# gccgo uses "mipso32" for mips/mipsle and "mipsn64" for mips64/mips64le
ifeq ($(findstring mips,$(DEB_BUILD_ARCH)),mips)
# mipsel => mipsle, mips64el => mips64le
BUILDTAGS := $(DEB_BUILD_ARCH:el=le)
endif

ifdef BUILDTAGS
override_dh_auto_build:
	dh_auto_build -O--buildsystem=golang -O--no-parallel -- -tags $(BUILDTAGS)

override_dh_auto_test:
	dh_auto_test -O--buildsystem=golang -O--no-parallel -- -tags $(BUILDTAGS)
endif