#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

override_dh_auto_install:
	cd obj-$(DEB_TARGET_GNU_TYPE); \
	help2man -N -n "code-generation generics solution for golang" \
		--version-string="$(DEB_VERSION)" --no-discard-stderr \
		-o genny.1 bin/genny
	dh_auto_install

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

ifeq ($(filter nocheck, $(DEB_BUILD_OPTIONS)),)
override_dh_auto_test:
ifneq ($(filter $(DEB_TARGET_ARCH), alpha powerpc ppc64 x32),)
# Ignore failure on some systems
# Reported to upstream: https://github.com/cheekybits/genny/issues/68
	-dh_auto_test
else
	dh_auto_test
endif
endif
