#!/usr/bin/make -f # resolve DEB_DISTRIBUTION include /usr/share/dpkg/pkg-info.mk # resolve if release is experimental DEB_SUITE_EXP = $(filter experimental% UNRELEASED,$(DEB_DISTRIBUTION)) # use local fork of debcargo and dh-cargo PATH := $(CURDIR)/debian/dh-cargo/bin:$(PATH) PERL5LIB = $(CURDIR)/debian/dh-cargo/lib export PATH PERL5LIB CRATE_VERSION = $(shell grep -Po 'version\W+\K[^"]+' identity/Cargo.toml) %: dh $@ --buildsystem cargo override_dh_auto_test: dh_auto_test -- --no-fail-fast $(if $(DEB_SUITE_EXP),|| true) # avoid cleaning unless source is patched override_dh_auto_clean: grep -q '"core"' Cargo.toml || dh_auto_clean