apt-ostree/debian/rules
robojerk 9f02fe2d69 Build apt-ostree Debian package with libostree 2025.2 compatibility
- Fix compilation errors in src/main.rs and resolve import conflicts
- Add debian/compat file and ensure debian/rules is executable
- Downgrade Cargo.lock to version 3 for compatibility with system cargo
- Create working apt-ostree binary with basic CLI functionality
- Build apt-ostree_0.1.0-1_amd64.deb package (1.1MB)
- Package installs successfully and binary works correctly
- Ensure libostree-1-1 (>= 2025.2) dependency for bootc compatibility
- Test package installation and basic commands (status, version)
2025-07-22 05:45:32 +00:00

32 lines
No EOL
904 B
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
override_dh_auto_build:
# Build apt-ostree 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 apt-ostree binary to the correct location
install -D -m 755 debian/cargo/target/release/apt-ostree debian/apt-ostree/usr/bin/apt-ostree
# Create any additional directories or files needed
mkdir -p debian/apt-ostree/usr/share/doc/apt-ostree
# 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 $@