]> git.proxmox.com Git - cargo.git/blob - debian/rules
Update upstream source from tag 'upstream/0.33.0'
[cargo.git] / debian / rules
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
6 include /usr/share/rustc/architecture.mk
7
8 export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
9 export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
10
11 CARGO = $(CURDIR)/debian/bin/cargo
12
13 export CARGO_HOME = $(CURDIR)/debian/cargo_home
14 export DEB_CARGO_CRATE=cargo_$(DEB_VERSION_UPSTREAM)
15 export DEB_CARGO_PACKAGE=cargo
16
17 # don't shrink, this can take ages
18 # see https://github.com/rust-lang/cargo/issues/6490 for details
19 export PROPTEST_MAX_SHRINK_ITERS = 0
20
21 # To run a specific test, run something like:
22 # $ debian/rules override_dh_auto_test-arch \
23 # CARGO_TEST_FLAGS="package::include -- <args ...>"
24 # See `cargo test --help` for more options.
25 CARGO_TEST_FLAGS =
26
27 %:
28 dh $@ --with bash-completion
29
30 override_dh_auto_configure:
31 $(CARGO) prepare-debian $(CURDIR)/vendor
32
33 override_dh_auto_build-arch:
34 $(CARGO) build
35
36 override_dh_auto_build-indep:
37 $(CARGO) doc
38
39 override_dh_auto_test-arch:
40 CFG_DISABLE_CROSS_TESTS=1 $(CARGO) test $(CARGO_TEST_FLAGS)
41
42 override_dh_auto_test-indep:
43 # no arch-indep tests
44
45 override_dh_auto_install:
46 $(CARGO) install
47
48 override_dh_auto_clean:
49 $(CARGO) clean
50
51 override_dh_clean:
52 # Upstream contains a lot of these
53 dh_clean -XCargo.toml.orig