| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/pkg-info.mk |
| 4 |
|
| 5 |
export DH_GOLANG_EXCLUDES := tinygotest |
| 6 |
export GOPATH := $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE) |
| 7 |
|
| 8 |
override_dh_auto_build: |
| 9 |
# build the "msgp" binary |
| 10 |
dh_auto_build |
| 11 |
# use new binary to refresh generated code |
| 12 |
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" \ |
| 13 |
dh_auto_build |
| 14 |
|
| 15 |
# generate a man page |
| 16 |
mkdir man1/ |
| 17 |
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 |
| 18 |
|
| 19 |
%: |
| 20 |
dh $@ --buildsystem=golang --with=golang |