#!/usr/bin/make -f

%:
	dh $@ --buildsystem cargo

override_dh_fixperms:
	# src/lib.rs and src/state/direct/streams.rs carry a stray executable
	# permission bit from upstream's release tarball, which lintian flags as
	# executable-not-elf-or-script. dh_fixperms alone cannot strip it because
	# the user's execute bit is preserved by its go=rX,u+rw,a-s rule, so strip
	# the execute bit from all source files before running dh_fixperms.
	find . -name '*.rs' -exec chmod -x {} +
	dh_fixperms
