File: rules

package info (click to toggle)
golang-github-tinylib-msgp 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,344 kB
  • sloc: makefile: 48
file content (20 lines) | stat: -rwxr-xr-x 785 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/make -f

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

export DH_GOLANG_EXCLUDES := tinygotest
export GOPATH := $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)

override_dh_auto_build:
	# build the "msgp" binary
	dh_auto_build
	# use new binary to refresh generated code
	DH_GOLANG_GO_GENERATE=1 DH_GOLANG_BUILDPKG="github.com/tinylib/msgp/_generated github.com/tinylib/msgp/gen github.com/tinylib/msgp/msgp github.com/tinylib/msgp/msgp/setof github.com/tinylib/msgp/parse github.com/tinylib/msgp/printer" PATH="$(GOPATH)/bin:$$PATH" \
		dh_auto_build

	# generate a man page
	mkdir man1/
	TZ=UTC help2man $(GOPATH)/bin/msgp -n "Go code generator for MessagePack" --no-info --no-discard-stderr --version-string=$(DEB_VERSION_UPSTREAM) > man1/msgp.1

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