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
|
#!/usr/bin/make -f
include /usr/share/rustc/architecture.mk
export DEB_HOST_GNU_TYPE
export DEB_HOST_RUST_TYPE
CARGO = /usr/share/cargo/bin/cargo
ifneq ($(DEB_TARGET_ARCH),mips64el)
# mips64el: see https://bugs.debian.org/1076650
RUSTFLAGS += -C codegen-units=1
endif
# these lto-related options seem to cause build errors that i don't understand
# see https://salsa.debian.org/rust-team/rust/-/merge_requests/41
#RUSTC_ARGS += -C lto=true -C linker-plugin-lto=true -C embed-bitcode=true
export RUSTFLAGS
CARGO_BUILD_ARGS = build --release --verbose
export CARGO_HOME = $(CURDIR)/debian/cargo_home
TARGET_RELEASE_DIR = target/$(DEB_HOST_RUST_TYPE)/release
%:
dh $@ --buildsystem cargo --with bash-completion
execute_after_dh_auto_build:
$(CARGO) $(CARGO_BUILD_ARGS) --bin sqopv --features=cliv
$(CARGO) $(CARGO_BUILD_ARGS) --bin sqop --features=cli
override_dh_auto_test:
dh_auto_test -- test --all
|