File: rules

package info (click to toggle)
waypipe 0.11.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,276 kB
  • sloc: ansic: 15,809; xml: 9,436; python: 1,726; sh: 101; makefile: 35
file content (46 lines) | stat: -rwxr-xr-x 1,206 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk
include /usr/share/rustc/architecture.mk
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
export DEB_CARGO_CRATE=waypipe_0.11.0
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
export PATH := /usr/share/cargo/bin/:$(PATH)
export CARGO_HOME=$(CURDIR)/debian/cargo_home
export CARGO_REGISTRY=$(CURDIR)/debian/local-registry

RUNTIME_LIBS=libavcodec.so libgbm.so

%:
	dh $@

execute_before_dh_auto_configure:
	mkdir -p .cargo
	cargo prepare-debian $(CARGO_REGISTRY) --link-from-system
	mv Cargo.lock Cargo.lock.ignored

execute_after_dh_auto_clean:
	rm -f waypipe.1
	rm -rf target
	if [ -f Cargo.lock.ignored ]; then \
	  mv Cargo.lock.ignored Cargo.lock; \
	fi
	rm -rf $(CARGO_REGISTRY)
	rm -rf $(CARGO_HOME)

override_dh_auto_configure:

override_dh_auto_build:
	cargo build --release
	scdoc < waypipe.scd > waypipe.1

override_dh_auto_install:
	install -D target/$(DEB_HOST_RUST_TYPE)/release/waypipe debian/tmp/usr/bin/waypipe

override_dh_auto_test:
	cargo test --release

execute_before_dh_gencontrol:
	dh-cargo-built-using waypipe
	DEB_HOST_MULTIARCH=$(DEB_HOST_MULTIARCH) debian/runtime-recommends.sh $(RUNTIME_LIBS)