diff --git a/debian/rules b/debian/rules index 8912d637..2a062069 100755 --- a/debian/rules +++ b/debian/rules @@ -14,14 +14,11 @@ export CARGO_TARGET_DIR = $(CURDIR)/debian/cargo/target DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) -# Rust target for cross-compilation -RUST_TARGET := $(shell dpkg-architecture -qDEB_HOST_ARCH_GNU_TYPE) +# Rust target for cross-compilation (simplified) +RUST_TARGET := $(DEB_HOST_ARCH) # Build flags CARGO_FLAGS := --release -ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) - CARGO_FLAGS += --target $(RUST_TARGET) -endif override_dh_auto_build: @echo "Building apt-ostree for $(DEB_HOST_ARCH)..." @@ -34,7 +31,7 @@ override_dh_auto_build: override_dh_auto_install: @echo "Installing apt-ostree binary..." # Install the apt-ostree binary to the correct location - install -D -m 755 debian/cargo/target/$(if $(filter $(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)),release,$(RUST_TARGET)/release)/apt-ostree \ + install -D -m 755 debian/cargo/target/release/apt-ostree \ debian/apt-ostree/usr/bin/apt-ostree # Create additional directories mkdir -p debian/apt-ostree/usr/share/doc/apt-ostree @@ -65,8 +62,7 @@ override_dh_auto_clean: override_dh_strip: # Strip debug symbols from binary - dh_strip --dbg-package=apt-ostree-dbg - # Keep debug package for development + dh_strip override_dh_shlibdeps: # Handle shared library dependencies