1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#!/usr/bin/make -f
# use local fork of debcargo and dh-cargo
PATH := $(CURDIR)/debian/dh-cargo/bin:$(PATH)
PERL5LIB = $(CURDIR)/debian/dh-cargo/lib
export PATH PERL5LIB
%:
dh $@ --buildsystem cargo
# avoid too brittle snapshot tests
override_dh_auto_test:
dh_auto_test -- --lib --bins --examples
# TODO: teach dh-cargo to avoid non-main crates in main crate
# and mangle Cargo.toml for non-main crates
execute_after_dh_auto_install:
rm -rf debian/librust-test-case-dev/usr/share/cargo/registry/test-case-2.2.2/crates
perl -0777 -p -i \
-e 's/path = "crates\/test-case-macros", //;' \
-e 's/\[workspace\][^\n]*(\n[^\[\n][^\n]*)*//g;' \
debian/librust-test-case-dev/usr/share/cargo/registry/test-case-2.2.2/Cargo.toml
|