#!/usr/bin/make -f

export CARGO_HOME = $(CURDIR)/debian/cargo
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# the below avoids an FTBFS on mips64el with a GOT > 64kb
include /usr/share/dpkg/architecture.mk
ifeq ($(DEB_HOST_ARCH),mips64el)
 export RUSTFLAGS = -Ctarget-feature=+xgot
endif

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

# The Debian version of linked-hash-map doesn't provide any hash,
# causing Cargo to refuse to build with a crates.io copy
build-arch:
	rm Cargo.lock
	dh $@ --builddirectory=_build --buildsystem=meson

override_dh_autoreconf:
