File: rules

package info (click to toggle)
cargo 0.37.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 47,676 kB
  • sloc: python: 2,104; sh: 960; ansic: 111; makefile: 80; ruby: 76
file content (55 lines) | stat: -rwxr-xr-x 1,421 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk
include /usr/share/rustc/architecture.mk

export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE

CARGO = $(CURDIR)/debian/bin/cargo

export CARGO_HOME = $(CURDIR)/debian/cargo_home
export DEB_CARGO_CRATE=cargo_$(DEB_VERSION_UPSTREAM)
export DEB_CARGO_PACKAGE=cargo
export RUSTFLAGS += --remap-path-prefix=$(CURDIR)=/usr/src/cargo-$(DEB_VERSION_UPSTREAM)

# don't shrink, this can take ages
# see https://github.com/rust-lang/cargo/issues/6490 for details
export PROPTEST_MAX_SHRINK_ITERS = 0
export CARGO_TEST_SLOW_CPU_MULTIPLIER = 4

# To run a specific test, run something like:
#   $ debian/rules override_dh_auto_test-arch \
#     CARGO_TEST_FLAGS="package::include -- <args ...>"
# See `cargo test --help` for more options.
CARGO_TEST_FLAGS =

%:
	dh $@ --with bash-completion

override_dh_auto_configure:
	$(CARGO) prepare-debian $(CURDIR)/vendor

override_dh_auto_build-arch:
	$(CARGO) build

override_dh_auto_build-indep:
	$(CARGO) doc

override_dh_auto_test-arch:
	CFG_DISABLE_CROSS_TESTS=1 $(CARGO) test $(CARGO_TEST_FLAGS)

override_dh_auto_test-indep:
	# no arch-indep tests

override_dh_auto_install:
	$(CARGO) install

override_dh_auto_clean:
	$(CARGO) clean

override_dh_clean:
	# Upstream contains a lot of these
	dh_clean -XCargo.toml.orig