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 35 36 37 38 39 40 41
|
#!/usr/bin/make -f
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4
include /usr/share/dpkg/default.mk
include /usr/share/rustc/architecture.mk
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
export PATH := /usr/share/cargo/bin:$(PATH)
export CARGO=/usr/share/cargo/bin/cargo
export CARGO_HOME=$(CURDIR)/debian/cargo_home
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
# Disable lto on 32-bit arches since it OOMs otherwise
ifeq ($(DEB_HOST_ARCH_BITS),32)
export DEB_BUILD_OPTIONS += optimize=-lto
endif
ifeq ($(filter libglycin-gtk4-2-dev,$(shell dh_listpackages)),)
GTK4 = -Dlibglycin-gtk4=false
endif
%:
dh $@
execute_after_dh_auto_clean:
rm -rf debian/cargo_registry
# Disable tests because we cannot run bwrap in a container environment like unshare or schroot
override_dh_auto_configure:
$(CARGO) prepare-debian debian/cargo_registry --link-from-system
rm -f Cargo.lock
dh_auto_configure -- \
-Dhost_arch="$(DEB_HOST_RUST_TYPE)" \
-Dtests=false \
$(GTK4)
# Give the tests more time on slow arches
override_dh_auto_test:
dh_auto_test -- --timeout-multiplier 5
|