#!/usr/bin/make -f

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

export DH_GOLANG_BUILDPKG := wait4x.dev/v3/cmd/wait4x
export GOFLAGS := -tags=disable_influxdb,disable_redis,disable_temporal

MAN_NAME_SECTION="Wait for a port or a service to enter the requested state"

%:
	dh $@ --builddirectory=_build --buildsystem=golang

execute_after_dh_auto_install:
	# Generate man page
	help2man $(CURDIR)/debian/tmp/usr/bin/wait4x --name=$(MAN_NAME_SECTION) --version-string=$(DEB_VERSION_UPSTREAM) > debian/wait4x.1

override_dh_auto_test:
	# Most tests require either test container libraries or an internet
	# connection, skip for now
