1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/make -f
# Enable all hardening options
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Set HOME for cargo (Launchpad builds need this)
export HOME = /tmp/build-home
export CARGO_HOME = $(HOME)/.cargo
%:
dh $@
override_dh_auto_configure:
# Create temporary home directory for cargo
mkdir -p $(CARGO_HOME)
# Verify rust toolchain is available
rustc --version
cargo --version
override_dh_auto_build:
# Build the project
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:
# Skip tests to save build time on Launchpad
@echo "Skipping tests for PPA build"
override_dh_auto_clean:
# Don't run dh_auto_clean as it requires cargo to be installed
# Just clean the build artifacts manually
rm -rf target/ $(HOME)
override_dh_builddeb:
dh_builddeb --destdir=../