]> git.proxmox.com Git - cargo.git/blame - debian/rules
refresh patches, rm Cargo.lock
[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)
786337bf 15export RUSTFLAGS += --remap-path-prefix=$(CURDIR)=/usr/src/cargo-$(DEB_VERSION_UPSTREAM)
59f3388f 16
8756f8d3
XL
17# don't shrink, this can take ages
18# see https://github.com/rust-lang/cargo/issues/6490 for details
19export PROPTEST_MAX_SHRINK_ITERS = 0
8d6b7be4 20export CARGO_TEST_SLOW_CPU_MULTIPLIER = 4
8756f8d3 21
fa3f0478
XL
22# To run a specific test, run something like:
23# $ debian/rules override_dh_auto_test-arch \
fc1bf0e8 24# CARGO_TEST_FLAGS="package::include -- <args ...>"
fa3f0478
XL
25# See `cargo test --help` for more options.
26CARGO_TEST_FLAGS =
e8ecb7e6 27
d61f8f73 28%:
9ab10f5f 29 dh $@ --with bash-completion
d61f8f73
LB
30
31override_dh_auto_configure:
9ab10f5f 32 $(CARGO) prepare-debian $(CURDIR)/vendor
a5996efa 33
eedc4049 34override_dh_auto_build-arch:
9ab10f5f 35 $(CARGO) build
eedc4049
XL
36
37override_dh_auto_build-indep:
9ab10f5f 38 $(CARGO) doc
1931a4c8 39
fa3f0478
XL
40override_dh_auto_test-arch:
41 CFG_DISABLE_CROSS_TESTS=1 $(CARGO) test $(CARGO_TEST_FLAGS)
42
43override_dh_auto_test-indep:
44 # no arch-indep tests
06619bc5 45
a5996efa 46override_dh_auto_install:
7ffcb28a 47 DESTDIR=$(CURDIR)/debian/cargo $(CARGO) install
a5996efa 48
d61f8f73 49override_dh_auto_clean:
9ab10f5f 50 $(CARGO) clean
eedc4049 51
f4bc9b9c
XL
52override_dh_clean:
53 # Upstream contains a lot of these
54 dh_clean -XCargo.toml.orig
90a23026 55 rm -f Cargo.lock