| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 4 |
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs |
| 5 |
|
| 6 |
include /usr/share/dpkg/default.mk |
| 7 |
include /usr/share/rustc/architecture.mk |
| 8 |
export CARGO=/usr/share/cargo/bin/cargo |
| 9 |
export CARGO_HOME=$(shell pwd)/debian/cargo_home |
| 10 |
export CARGO_REGISTRY=$(shell pwd)/debian/cargo_registry |
| 11 |
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) |
| 12 |
export DEB_HOST_RUST_TYPE |
| 13 |
|
| 14 |
%: |
| 15 |
dh $@ |
| 16 |
|
| 17 |
execute_after_dh_auto_clean: |
| 18 |
$(CARGO) clean |
| 19 |
rm -rf $(CARGO_HOME) |
| 20 |
rm -rf $(CARGO_REGISTRY) |
| 21 |
|
| 22 |
execute_before_dh_auto_configure: |
| 23 |
$(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system |
| 24 |
rm -f Cargo.lock |
| 25 |
rm -f .cargo/config |
| 26 |
|
| 27 |
# Give the tests more time on slow arches |
| 28 |
override_dh_auto_test: |
| 29 |
dh_auto_test -- --timeout-multiplier 5 |
| 30 |
|
| 31 |
override_dh_auto_install: |
| 32 |
$(if $(findstring armhf,$(DEB_HOST_ARCH)), DEB_BUILD_OPTIONS="parallel=4 $(filter-out parallel=%,$(DEB_BUILD_OPTIONS))") dh_auto_install |