File: rules

package info (click to toggle)
notary 0.6.1~ds1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,692 kB
  • sloc: python: 1,112; sh: 481; makefile: 181; sql: 155
file content (31 lines) | stat: -rwxr-xr-x 1,036 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
#!/usr/bin/make -f

## Depends += gogoprotobuf golang-goprotobuf-dev
#export DH_GOLANG_GO_GENERATE := 1   :: this should be enabled

export DH_GOLANG_INSTALL_EXTRA := fixtures
GOPKG     := github.com/theupdateframework/notary
BUILDDIR  := $(CURDIR)/_build
BUILDTAGS := pkcs11

%:
	dh $@ --builddirectory=$(BUILDDIR) \
	      --buildsystem=golang \
	      --with=golang

override_dh_auto_configure:
	# Note(zhsj): some certs are expired and cause test failures.
	# but there's no need to regenerate certs which need cfssljson tool.
	# And I don't want to add another Build-Depends.
	sed -i '/command -v cfssljson/i exit 0' ./fixtures/regenerateTestingCerts.sh
	cd fixtures && ./regenerateTestingCerts.sh
	dh_auto_configure

override_dh_auto_build:
	dh_auto_build -- -tags "$(BUILDTAGS)"

override_dh_auto_install:
	# There's no reason to ship this script as it's not needed for the tests,
	# and will cause Lintian to warn about a 'script-not-executable'.
	rm $(BUILDDIR)/src/$(GOPKG)/fixtures/regenerateTestingCerts.sh
	dh_auto_install