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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs
%:
dh $@ --with bash_completion
CONFFLAGS =
ifeq ($(DEB_HOST_ARCH_OS),linux)
CONFFLAGS += \
-Dnetworkmanager=true \
-Dsystemd=true
endif
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
CONFFLAGS += -Dtests=true
else
CONFFLAGS += -Dtests=false
endif
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
CONFFLAGS += --cross-file=$(DEB_HOST_GNU_TYPE)-gobject-introspection.ini
endif
override_dh_auto_configure:
dh_auto_configure -- \
--libdir=/usr/lib \
-Dportal_helper=false \
-Dextensions-tool:bash_completion=enabled \
$(CONFFLAGS)
override_dh_makeshlibs:
dh_makeshlibs -X/usr/lib/gnome-shell/
override_dh_shlibdeps:
# gnome-shell uses mutters private mutter-clutter-1.0.so etc.
dh_shlibdeps -l"usr/lib/$(DEB_HOST_MULTIARCH)/mutter"
# Upstream test timeouts assume an otherwise unloaded system, but that
# isn't necessarily the case for a porterbox or multiple parallel builds.
# Keep the timeout reasonably short for architectures where interactive
# debugging is more likely, but extend it a lot on architectures that might
# be very slow or using qemu for buildds.
ifneq ($(filter amd64 i386,$(DEB_HOST_ARCH_CPU)),)
test_timeout_multiplier = 3
else
test_timeout_multiplier = 20
endif
meson_test_options = --timeout-multiplier $(test_timeout_multiplier)
ifneq ($(filter mips64el riscv64,$(DEB_HOST_ARCH_CPU)),)
# gnome-shell on mips64el works on a real GPU (in practice usually an
# AMD GPU), but crashes when using llvmpipe or softpipe, which is all that
# is available on the buildds, so we only run the unit tests at build time
# and skip the tests that would run the whole Shell. See discussion in
# https://salsa.debian.org/gnome-team/gnome-shell/-/merge_requests/71
meson_test_options += --no-suite shell
else ifneq ($(filter mips64el riscv64,$(AUTOPKGTEST_TEST_ARCH)),)
meson_test_options += --no-suite shell
endif
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
env XDG_CACHE_HOME="$(shell mktemp -d -t cache-XXXXXXXX)" \
dbus-run-session -- \
xvfb-run -a -e /proc/self/fd/2 -s '-noreset -screen 0 1280x1024x24' \
dh_auto_test -- $(meson_test_options)
endif
# Skip. We only use dh_gnome for dh_translations for Ubuntu
override_dh_gnome:
|