- Add PATH export in debian/rules build step to ensure cargo finds rustup tools - Fix binary install path to use debian/cargo/target/release/bootc (correct cargo target dir) - Remove conflicting dh_auto_install call that was looking for wrong binary path - Add manual package structure creation (usr/share/doc/bootc directory) - Ensure rustup environment variables are set in workflow step for dpkg-buildpackage This resolves the 'rustup could not choose a version of cargo' error and the 'install: cannot stat target/release/bootc' error by properly handling the CARGO_TARGET_DIR setting and avoiding conflicting install targets. Build should now complete successfully from cargo compilation through package creation and upload to Forgejo Debian Package Registry.
38 lines
No EOL
1 KiB
Makefile
Executable file
38 lines
No EOL
1 KiB
Makefile
Executable file
#!/usr/bin/make -f
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
#export DH_VERBOSE = 1
|
|
|
|
# This has to be exported to make some magic below work.
|
|
export DH_OPTIONS
|
|
|
|
# Build system
|
|
export CARGO_HOME = $(CURDIR)/debian/cargo
|
|
export CARGO_TARGET_DIR = $(CURDIR)/debian/cargo/target
|
|
|
|
# Apply our compatibility patch
|
|
override_dh_auto_patch:
|
|
# Apply the libostree compatibility patch
|
|
patch -p1 < ../bootc-libostree-compatibility.patch
|
|
dh_auto_patch
|
|
|
|
override_dh_auto_build:
|
|
# Build bootc with cargo - ensure rustup environment is available
|
|
export PATH=$(HOME)/.cargo/bin:$$PATH
|
|
cargo build --release
|
|
dh_auto_build
|
|
|
|
override_dh_auto_install:
|
|
# Install the bootc binary to the correct location
|
|
install -D -m 755 debian/cargo/target/release/bootc debian/bootc/usr/bin/bootc
|
|
# Create any additional directories or files needed
|
|
mkdir -p debian/bootc/usr/share/doc/bootc
|
|
# Skip dh_auto_install since we've handled installation manually
|
|
|
|
override_dh_auto_clean:
|
|
# Clean cargo build artifacts
|
|
rm -rf debian/cargo
|
|
dh_auto_clean
|
|
|
|
%:
|
|
dh $@
|