File: rules

package info (click to toggle)
golang-github-adroll-goamz 0.0~git20150909.0.74fd457-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,476 kB
  • ctags: 2,443
  • sloc: makefile: 41
file content (25 lines) | stat: -rwxr-xr-x 760 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
#!/usr/bin/make -f

# cloudwatch requires feyeleanor/sets
# dynamodb requires cbroglie/mapstructure and bitly/go-simplejson
export DH_GOLANG_EXCLUDES := \
	cloudwatch \
	dynamodb

export DH_GOLANG_INSTALL_ALL := 1 # need testdata

override_dh_auto_test:
	# "Note: running all tests with the command `go test ./...` will currently fail as tests do not tear down their HTTP listeners."
	set -e; \
		for pkg in $$( \
			cd obj-$(DEB_BUILD_GNU_TYPE)/src; \
			find github.com/AdRoll/goamz -name '*_test.go' \
				| xargs dirname \
				| sort -u \
		); do \
			for excl in $(DH_GOLANG_EXCLUDES); do if [ "$$pkg" != "$${pkg%*$$excl*}" ]; then continue 2; fi; done; \
			DH_GOLANG_BUILDPKG="$$pkg" dh_auto_test; \
		done

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