Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 include /usr/share/dpkg/default.mk
4 include /usr/share/rustc/architecture.mk
5 export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
6 export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
7 export PATH := /usr/share/cargo/bin:$(PATH)
8 export CARGO=/usr/share/cargo/bin/cargo
9 export CARGO_HOME=$(CURDIR)/debian/cargo_home
10 export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
11 export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
12
13 %:
14 dh $@ --without=single-binary
15
16 execute_after_dh_auto_clean:
17 rm -rf debian/cargo_registry
18
19 # Pass DEB_HOST_RUST type to meson to build
20 override_dh_auto_configure:
21 $(CARGO) prepare-debian debian/cargo_registry --link-from-system
22 rm -f Cargo.lock
23 dh_auto_configure -- \
24 -Dhost_arch="$(DEB_HOST_RUST_TYPE)" \
25
26 # Give the tests more time on slow arches
27 override_dh_auto_test:
28 dh_auto_test -- --timeout-multiplier 3
29
30 # Generate (Static-)Built-Using
31 # Symlink the meson target dir to target/$(DEB_HOST_RUST_TYPE)/release
32 # since dh-cargo-built-using expects it there
33 execute_after_dh_auto_install:
34 mkdir -p $(CURDIR)/target/$(DEB_HOST_RUST_TYPE)/
35 ln -s $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/src/$(DEB_HOST_RUST_TYPE)/release target/$(DEB_HOST_RUST_TYPE)/
36 /usr/share/cargo/bin/dh-cargo-built-using kooha