#!/usr/bin/make -f

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

%:
	dh $@ --buildsystem cargo --with cargo

override_dh_auto_clean:
	dh_auto_clean -- --manifest-path pixie/Cargo.toml

override_dh_auto_build:
	dh_auto_build -- --manifest-path pixie/Cargo.toml --release --locked --offline

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test -- --manifest-path pixie/Cargo.toml --locked --offline --lib --bins
	dh_auto_test -- --manifest-path pixie/Cargo.toml --locked --offline --test config_tests --test logger_tests --test router_tests --test threadpool_tests
endif
