]> git.proxmox.com Git - cargo.git/blame - debian/rules
Release 0.40.0-2 to Debian unstable.
[cargo.git] / debian / rules
CommitLineData
d61f8f73
LB
1#!/usr/bin/make -f
2
3include /usr/share/dpkg/pkg-info.mk
4include /usr/share/dpkg/architecture.mk
5include /usr/share/dpkg/buildflags.mk
eadc1aeb
XL
6include /usr/share/rustc/architecture.mk
7
38f5700d 8export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
fc1bf0e8 9export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
d61f8f73 10
9ab10f5f 11CARGO = $(CURDIR)/debian/bin/cargo
fc1bf0e8
XL
12
13export CARGO_HOME = $(CURDIR)/debian/cargo_home
894c92c8 14export DEB_CARGO_CRATE=cargo_$(DEB_VERSION_UPSTREAM)
fc1bf0e8 15export DEB_CARGO_PACKAGE=cargo
786337bf 16export 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
20export PROPTEST_MAX_SHRINK_ITERS = 0
8d6b7be4 21export 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.
27CARGO_TEST_FLAGS =
e8ecb7e6 28
d61f8f73 29%:
9ab10f5f 30 dh $@ --with bash-completion
d61f8f73
LB
31
32override_dh_auto_configure:
9ab10f5f 33 $(CARGO) prepare-debian $(CURDIR)/vendor
a5996efa 34
eedc4049 35override_dh_auto_build-arch:
9ab10f5f 36 $(CARGO) build
eedc4049
XL
37
38override_dh_auto_build-indep:
9ab10f5f 39 $(CARGO) doc
1931a4c8 40
fa3f0478
XL
41override_dh_auto_test-arch:
42 CFG_DISABLE_CROSS_TESTS=1 $(CARGO) test $(CARGO_TEST_FLAGS)
43
44override_dh_auto_test-indep:
45 # no arch-indep tests
06619bc5 46
a5996efa 47override_dh_auto_install:
9ab10f5f 48 $(CARGO) install
a5996efa 49
d61f8f73 50override_dh_auto_clean:
9ab10f5f 51 $(CARGO) clean
eedc4049 52
f4bc9b9c
XL
53override_dh_clean:
54 # Upstream contains a lot of these
55 dh_clean -XCargo.toml.orig