File: rules

package info (click to toggle)
gnome-robots 1%3A41.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,580 kB
  • sloc: xml: 97; makefile: 25; sh: 7
file content (34 lines) | stat: -rwxr-xr-x 972 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs

include /usr/share/dpkg/default.mk
include /usr/share/rustc/architecture.mk
export CARGO=/usr/share/cargo/bin/cargo
export CARGO_HOME=$(shell pwd)/debian/cargo_home
export CARGO_REGISTRY=$(shell pwd)/debian/cargo_registry
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
export DEB_HOST_RUST_TYPE

%:
	dh $@

execute_after_dh_auto_clean:
	$(CARGO) clean
	rm -rf $(CARGO_HOME)
	rm -rf $(CARGO_REGISTRY)

override_dh_auto_configure:
	$(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system
	rm -f Cargo.lock
	rm -f .cargo/config
	dh_auto_configure -- \
		--bindir=games

# Give the tests more time on slow arches
override_dh_auto_test:
	dh_auto_test --  --timeout-multiplier 5

override_dh_auto_install:
	$(if $(findstring armhf,$(DEB_HOST_ARCH)), DEB_BUILD_OPTIONS="parallel=4 $(filter-out parallel=%,$(DEB_BUILD_OPTIONS))") dh_auto_install