#!/usr/bin/make -f #export DH_VERBOSE = 1 export ASSET_OUT_DIR=debian/tmp include /usr/share/dpkg/pkg-info.mk # Disable lto on 32-bit arches since it OOMs otherwise execute_before_dh_auto_configure: ifeq ($(DEB_HOST_ARCH_BITS),32) export DEB_BUILD_OPTIONS += optimize=-lto endif # enable on 64-bit execute_after_dh_auto_configure: ifeq ($(DEB_HOST_ARCH_BITS),64) echo 'lto="fat"' >> debian/cargo_home/config.toml echo 'codegen-units=1' >> debian/cargo_home/config.toml echo 'opt-level="z"' >> debian/cargo_home/config.toml cat debian/cargo_home/config.toml endif %: dh $@ --buildsystem cargo # skip these targets on arch:all builds override_dh_auto_test-indep: override_dh_auto_build-indep: override_dh_auto_install-indep: dh_install override_dh_auto_install-arch: # separately, to avoid installing binaries into wrong DESTDIR dh_auto_install -p gpg-sq -- --bin gpg-sq dh_auto_install -p gpgv-sq -- --bin gpgv-sq override_dh_install-arch: mkdir -p debian/gpg-sq/usr/bin/ # compat for dh-cargo < 33, can be removed once it is in forky mv debian/*/usr/bin/gpg-sq debian/gpg-sq/usr/bin/ || true dh_install