File: rules

package info (click to toggle)
rust-cargo-outdated 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 364 kB
  • sloc: makefile: 20
file content (30 lines) | stat: -rwxr-xr-x 679 bytes parent folder | download
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
#!/usr/bin/make -f

%:
	dh $@ --buildsystem cargo

#lto disabled on 32bit architectures due to address space exhaustion.
ifeq ($(DEB_HOST_ARCH_BITS), 32)
  LTO=false
else
  LTO=true
endif

override_dh_auto_build:
	sed -i 's/lto = .*/lto = $(LTO)/' Cargo.toml
	dh_auto_build

override_dh_auto_clean:
	dh_auto_clean
	sed -i 's/lto = .*/lto = true/' Cargo.toml

override_dh_dwz:
	# Don't do anything. fails because of the
	# https://github.com/rust-lang/rust/issues/66118

#use lower debuginfo level on 32-bit to avoid running out of address space.
ifeq ($(DEB_HOST_ARCH_BITS),32)
execute_after_dh_auto_configure:
	sed -i s/debuginfo=2/debuginfo=1/ debian/cargo_home/config*
endif