#!/usr/bin/make -f
%:
	dh $@ --buildsystem cargo

# Disable lto on 32-bit arches since it OOMs otherwise
execute_before_dh_auto_configure:
ifeq ($(DEB_HOST_ARCH_BITS),32)
export DEB_BUILD_OPTIONS += optimize=-lto
endif

override_dh_auto_test:
	dh_auto_test -- test --all
	rm -f Cargo.lock
