]>
Commit | Line | Data |
---|---|---|
d61f8f73 LB |
1 | #!/usr/bin/make -f |
2 | ||
3 | include /usr/share/dpkg/pkg-info.mk | |
4 | include /usr/share/dpkg/architecture.mk | |
5 | include /usr/share/dpkg/buildflags.mk | |
eadc1aeb XL |
6 | include /usr/share/rustc/architecture.mk |
7 | ||
38f5700d | 8 | export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS |
fc1bf0e8 | 9 | export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE |
d61f8f73 | 10 | |
9ab10f5f | 11 | CARGO = $(CURDIR)/debian/bin/cargo |
fc1bf0e8 XL |
12 | |
13 | export CARGO_HOME = $(CURDIR)/debian/cargo_home | |
894c92c8 | 14 | export DEB_CARGO_CRATE=cargo_$(DEB_VERSION_UPSTREAM) |
fc1bf0e8 | 15 | export DEB_CARGO_PACKAGE=cargo |
786337bf | 16 | export RUSTFLAGS += --remap-path-prefix=$(CURDIR)=/usr/src/cargo-$(DEB_VERSION_UPSTREAM) |
59f3388f | 17 | |
8756f8d3 XL |
18 | # don't shrink, this can take ages |
19 | # see https://github.com/rust-lang/cargo/issues/6490 for details | |
20 | export PROPTEST_MAX_SHRINK_ITERS = 0 | |
8d6b7be4 | 21 | export CARGO_TEST_SLOW_CPU_MULTIPLIER = 4 |
8756f8d3 | 22 | |
fa3f0478 XL |
23 | # To run a specific test, run something like: |
24 | # $ debian/rules override_dh_auto_test-arch \ | |
fc1bf0e8 | 25 | # CARGO_TEST_FLAGS="package::include -- <args ...>" |
fa3f0478 XL |
26 | # See `cargo test --help` for more options. |
27 | CARGO_TEST_FLAGS = | |
e8ecb7e6 | 28 | |
d61f8f73 | 29 | %: |
9ab10f5f | 30 | dh $@ --with bash-completion |
d61f8f73 LB |
31 | |
32 | override_dh_auto_configure: | |
9ab10f5f | 33 | $(CARGO) prepare-debian $(CURDIR)/vendor |
a5996efa | 34 | |
eedc4049 | 35 | override_dh_auto_build-arch: |
9ab10f5f | 36 | $(CARGO) build |
eedc4049 XL |
37 | |
38 | override_dh_auto_build-indep: | |
9ab10f5f | 39 | $(CARGO) doc |
1931a4c8 | 40 | |
fa3f0478 XL |
41 | override_dh_auto_test-arch: |
42 | CFG_DISABLE_CROSS_TESTS=1 $(CARGO) test $(CARGO_TEST_FLAGS) | |
43 | ||
44 | override_dh_auto_test-indep: | |
45 | # no arch-indep tests | |
06619bc5 | 46 | |
a5996efa | 47 | override_dh_auto_install: |
9ab10f5f | 48 | $(CARGO) install |
a5996efa | 49 | |
d61f8f73 | 50 | override_dh_auto_clean: |
9ab10f5f | 51 | $(CARGO) clean |
eedc4049 | 52 | |
f4bc9b9c XL |
53 | override_dh_clean: |
54 | # Upstream contains a lot of these | |
55 | dh_clean -XCargo.toml.orig |