File: rules

package info (click to toggle)
rust-dolby-vision 3.3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 904 kB
  • sloc: ansic: 246; cpp: 30; makefile: 29
file content (38 lines) | stat: -rwxr-xr-x 926 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/dpkg/architecture.mk

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
else
	NUMJOBS = 1
endif

CARGO_C_FLAGS = --release \
	--destdir=debian/tmp \
	--prefix=/usr \
	--libdir=/usr/lib/${DEB_HOST_MULTIARCH} \
	--offline \
	-v \
	-j $(NUMJOBS)

%:
	dh $@ --buildsystem cargo

execute_after_dh_auto_build:
	CARGO_HOME=debian/cargo_home \
		/usr/share/cargo/bin/cargo cbuild $(CARGO_C_FLAGS)

override_dh_auto_test:
	dh_auto_test -- test --all

override_dh_auto_install:
	# will fail after installing the librust-XX package, since there is no binpkg
	# but dh-cargo thinks there is
	dh_auto_install || true
	CARGO_HOME=debian/cargo_home \
		/usr/share/cargo/bin/cargo cinstall $(CARGO_C_FLAGS)
	/usr/share/cargo/bin/dh-cargo-built-using libdovi3

execute_after_dh_install:
	find debian -name Cargo.lock -delete