File: rules

package info (click to toggle)
lintian-brush 0.165
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 12,348 kB
  • sloc: makefile: 877; xml: 119; python: 80; sh: 69; javascript: 3
file content (38 lines) | stat: -rwxr-xr-x 1,102 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
#!/usr/bin/make -f

include /usr/share/rustc/architecture.mk

export CARGO_HOME=$(CURDIR)/debian/cargo_home
# Set codegen-units to 1 for reproducible builds (parallel codegen is non-deterministic)
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
# Enable debug logging if 'debug' is in DEB_BUILD_OPTIONS
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
export RUST_LOG=debug
endif
ZSH_COMPDIR = /usr/share/zsh/vendor-completions/

CARGO_BASE_ARGS= --release --target $(DEB_HOST_RUST_TYPE)

%:
	dh $@ --with bash_completion

execute_before_dh_auto_configure:
	if test -f Cargo.lock; then mv Cargo.lock Cargo.lock.upstream; fi

override_dh_auto_build:
	cargo build $(CARGO_BASE_ARGS)

override_dh_auto_test:
	make testsuite

execute_after_dh_auto_install:
	mkdir -p debian/lintian-brush/$(ZSH_COMPDIR)
	install -m644 debian/lintian-brush.zsh-completion \
	    debian/lintian-brush/$(ZSH_COMPDIR)/_lintian-brush

override_dh_auto_clean:
	if test -f Cargo.lock.upstream; then mv Cargo.lock.upstream Cargo.lock; fi
	cargo clean || true

update-deps:
	update-rust-deps --drop-unreferenced --exclude-local-crate