2023-02-23 21:01:49 +01:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2023-10-15 19:31:23 +02:00
|
|
|
DEB_BUILD_OPTIONS=nocheck
|
2023-02-23 21:01:49 +01:00
|
|
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
|
|
|
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs
|
|
|
|
|
|
|
|
%:
|
2023-06-26 23:59:42 +02:00
|
|
|
dh $@ --with bash_completion
|
2023-06-26 23:26:28 +02:00
|
|
|
|
2023-02-23 21:01:49 +01:00
|
|
|
CONFFLAGS =
|
|
|
|
|
|
|
|
ifeq ($(DEB_HOST_ARCH_OS),linux)
|
|
|
|
CONFFLAGS += \
|
|
|
|
-Dnetworkmanager=true \
|
|
|
|
-Dsystemd=true
|
|
|
|
endif
|
|
|
|
|
2023-06-26 23:26:28 +02:00
|
|
|
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
|
|
|
CONFFLAGS += -Dtests=true
|
|
|
|
else
|
2023-02-23 21:01:49 +01:00
|
|
|
CONFFLAGS += -Dtests=false
|
2023-06-26 23:26:28 +02:00
|
|
|
endif
|
2023-02-23 21:01:49 +01:00
|
|
|
|
|
|
|
override_dh_auto_configure:
|
2023-10-15 19:21:17 +02:00
|
|
|
dh_auto_configure -- \
|
|
|
|
--libdir=/usr/lib \
|
2023-02-23 21:01:49 +01:00
|
|
|
-Dextensions-tool:bash_completion=enabled \
|
|
|
|
$(CONFFLAGS)
|
|
|
|
|
|
|
|
override_dh_makeshlibs:
|
2023-10-15 19:21:17 +02:00
|
|
|
dh_makeshlibs -X/usr/lib/gnome-shell/
|
2023-02-23 21:01:49 +01:00
|
|
|
|
|
|
|
override_dh_shlibdeps:
|
2023-10-15 19:21:17 +02:00
|
|
|
# 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 mips%,$(DEB_HOST_ARCH_CPU)),)
|
|
|
|
# gnome-shell on mips(64)el 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
|
|
|
|
endif
|
2023-02-23 21:01:49 +01:00
|
|
|
|
|
|
|
override_dh_auto_test:
|
2023-10-15 19:21:17 +02:00
|
|
|
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
|
|
|
|
env XDG_CACHE_HOME="$(shell mktemp -d -t cache-XXXXXXXX)" \
|
|
|
|
dbus-run-session xvfb-run -a dh_auto_test -- $(meson_test_options)
|
|
|
|
endif
|