]> git.proxmox.com Git - cargo.git/blob - debian/rules
3f59e40c86301157d6abf51fb98f841acd994ab6
[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 DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
9 export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS RUSTFLAGS
10
11 export CARGO_HOME = $(CURDIR)/debian/cargo_home
12 CARGO = $(CURDIR)/debian/bin/cargo
13 export DEB_CARGO_PACKAGE=cargo
14 export DEB_CARGO_CRATE=cargo_$(DEB_VERSION_UPSTREAM)
15
16 # Disable tests on powerpc and powerpcspe for now.
17 # cbmuser requested this and will fix the errors later
18 # TODO: once powerpc powerpcspe test failures are fixed drop this
19 ifneq (,filter($(DEB_HOST_ARCH), powerpc powerpcspe))
20 POST_TEST = || true
21 endif
22
23 %:
24 dh $@ --with bash-completion
25
26 override_dh_auto_configure:
27 $(CARGO) prepare-debian $(CURDIR)/vendor
28
29 override_dh_auto_build-arch:
30 $(CARGO) build
31
32 override_dh_auto_build-indep:
33 $(CARGO) doc
34
35 override_dh_auto_test:
36 CFG_DISABLE_CROSS_TESTS=1 $(CARGO) test $(POST_TEST)
37
38 override_dh_auto_install:
39 $(CARGO) install
40
41 override_dh_auto_clean:
42 $(CARGO) clean
43
44 override_dh_clean:
45 # Upstream contains a lot of these
46 dh_clean -XCargo.toml.orig