bssh 1.7.0

Parallel SSH command execution tool for cluster management
Documentation
#!/usr/bin/make -f

# Enable all hardening options
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Rust/Cargo specific settings
export CARGO_HOME = $(CURDIR)/debian/cargo
export CARGO_TARGET_DIR = $(CURDIR)/target

%:
	dh $@

override_dh_auto_configure:
	# Install Rust if not present (Launchpad builders may not have it)
	if ! command -v rustc >/dev/null 2>&1; then \
		curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal; \
		. $(HOME)/.cargo/env; \
	fi
	# Ensure we have the stable toolchain
	$(HOME)/.cargo/bin/rustup default stable || rustup default stable

override_dh_auto_build:
	# If Cargo.lock is lockfile v4, regenerate with Cargo 1.75 (produces v3)
	if grep -q '^version = 4' Cargo.lock 2>/dev/null; then \
		rm -f Cargo.lock; \
		cargo generate-lockfile; \
	fi
	# Build the project with cargo
	cargo build --release --locked

override_dh_auto_install:
	# Install the compiled binary
	install -D -m 0755 target/release/bssh debian/bssh/usr/bin/bssh

override_dh_auto_test:
	# Run tests
	PATH="$(HOME)/.cargo/bin:$(PATH)" cargo test --release --locked || true

override_dh_auto_clean:
	# Clean cargo build artifacts
	rm -rf $(CARGO_TARGET_DIR) $(CARGO_HOME)
	dh_auto_clean

override_dh_builddeb:
	dh_builddeb --destdir=../