#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

execute_before_dh_auto_build:
# Disable Stretcher test on powerpc, ppc64 and ppc64el because it fails with SIGinvalid
ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),powerpc ppc64 ppc64el))
	sed -e "/TestStretcher/ s/^#*/#/" -i meson.build
	sed -e "/test('Stretcher/ s/^#*/#/" -i meson.build
endif
	docbook-to-man debian/rubberband.sgml > debian/rubberband.1

override_dh_auto_configure:
	dh_auto_configure -- -Dresampler=libsamplerate -Dfft=fftw

override_dh_auto_test:
	dh_auto_test -- --timeout-multiplier 20