#!/usr/bin/make -f

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

override_dh_auto_install:
	dh_auto_install -- --no-source

# Skip two tests that exercise the fake remote-shell (-e) code path.
# The freshly fork-exec'd subprocess calls libcap-psx during landlock
# setup, which opendir()s /proc/self/task to enumerate threads.
# On Debian buildds (schroot with host procfs) this aborts with
# "failed to read /proc/<pid>/task", whereas sbuild --chroot-mode=unshare
# (private PID namespace + private procfs) and regular CI environments
# work fine. Skip just the two affected tests; everything else, including
# the real-SSH landlock path, runs.
override_dh_auto_test:
	dh_auto_test -- -skip '^TestReceiverCommand$$|^TestReceiverCommandDryRun$$'
