#!/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

# The daemon tests need a session bus and ibus-daemon, which a package build does not have; CI runs
# them on every pull request.
override_dh_auto_configure:
	dh_auto_configure -- -DNGOSEN_IBUS_DAEMON_TESTS=OFF

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