Files
gt-tool/debian/rules
Robert Garrett 4778c6f362 Add a cargo-checksum.json, remove its fake
See "https://wiki.debian.org/Teams/RustPackaging/Policy"

In section "Library package structure", the policy manual explains that
this file is meant to exist in the Debian package (i.e.: it's not
generated during the build) and should contain the SHA256 checksum of
the upstream crate.

The crate's internal arrangement can change depending on which version
of Cargo was used to create it. This checksum is from Rust 1.93, the
current stable at time of writing. Debian 13's Rust 1.85 produces a
different file with a different sum. I'm not sure what to do about that
right now.
2025-11-13 21:36:08 -06:00

25 lines
680 B
Makefile
Executable File

#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
include /usr/share/rustc/architecture.mk
export DEB_HOST_RUST_TYPE
export PATH:=/usr/share/cargo/bin:$(PATH)
export CARGO=/usr/share/cargo/bin/cargo
export CARGO_HOME=$(CURDIR)/debian/cargo_home
export CARGO_REGISTRY=$(CURDIR)/debian/cargo_registry
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
%:
dh $@ --buildsystem=cargo
execute_after_dh_auto_clean:
$(CARGO) clean
rm -rf $(CARGO_HOME)
rm -rf $(CARGO_REGISTRY)
execute_before_dh_auto_configure:
$(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system
rm -f Cargo.lock