#!/usr/bin/make -f # resolve DEB_VERSION include /usr/share/dpkg/pkg-info.mk %: dh $@ --sourcedirectory cranelift/umbrella # unlock dependencies during build execute_before_dh_auto_configure: [ -f Cargo.lock.orig ] || mv Cargo.lock Cargo.lock.orig override_dh_gencontrol: $(eval cranelift_version = $(shell grep -Po 'version\W+\K[^"]+' cranelift/umbrella/Cargo.toml)+$(DEB_VERSION)) dh_gencontrol -plibrust-cranelift-dev -- -v'$(cranelift_version)' dh_gencontrol --remaining-packages # avoid cleaning unless source is patched override_dh_auto_clean: grep -q crates/wasi-common/WASI/ Cargo.toml || dh_auto_clean --buildsystem rust # re-lock dependencies execute_after_dh_auto_clean: [ ! -f Cargo.lock.orig ] || mv -f Cargo.lock.lock Cargo.lock