#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Older Ubuntu releases ship a new enough Rust only as versioned packages (cargo-1.91).
export PATH := /usr/lib/rust-1.91/bin:$(PATH)

%:
	dh $@ --buildsystem=cmake

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3

override_dh_dwz:
	@echo "Skipping dh_dwz (incompatible with Go/mixed debug sections)"

override_dh_auto_configure:
	dh_auto_configure -- -DNGOSEN_BYTECOMPILE_PYTHON=OFF -DBUILD_TESTING=ON

# dh_clean deletes *.orig files, but the vendored crates' checksums cover Cargo.toml.orig.
override_dh_clean:
	dh_clean -XCargo.toml.orig
