#!/usr/bin/make -f

export GEM2DEB_TEST_RUNNER = --check-dependencies
export DH_RUBY = --gem-install
export DH_RUBY_GEM_INSTALL_EXCLUDE = benchmarks/* docs/* win_gem_test/* tools/* bin/puma-wild
export LANG = C.UTF-8
export LC_ALL = C.UTF-8
export TEST_CASE_TIMEOUT = 300

# On arm64 the build sandbox has no IPv6 loopback address, so
# test/test_pumactl.rb test_control_ipv6 fails while reserving a port on "::1"
# (Errno::EADDRNOTAVAIL). That is a limitation of the build environment and not
# of the built package, so skip the test suite on arm64 only; other
# architectures keep running it unchanged.
ifeq ($(DEB_HOST_ARCH),arm64)
export DEB_BUILD_OPTIONS := $(DEB_BUILD_OPTIONS) nocheck
endif

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

override_dh_installchangelogs:
	dh_installchangelogs History.md
