2023-02-23 21:01:49 +01:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2024-08-13 17:22:25 +02:00
|
|
|
include /usr/share/dpkg/default.mk
|
|
|
|
|
|
|
|
built_binaries := $(shell dh_listpackages)
|
|
|
|
|
2023-02-23 21:01:49 +01:00
|
|
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
2024-08-13 17:22:25 +02:00
|
|
|
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
|
|
|
|
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4
|
|
|
|
|
|
|
|
# Following upstream method to compute the API version
|
|
|
|
MUTTER_MAJOR_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed 's/[~.].*//')
|
|
|
|
MUTTER_API_VERSION = $(shell echo $$(( $(MUTTER_MAJOR_VERSION) - 32 )) )
|
|
|
|
MUTTER_SONAME = 0
|
|
|
|
|
|
|
|
export MUTTER_API_VERSION
|
|
|
|
export MUTTER_SONAME
|
2023-02-23 21:01:49 +01:00
|
|
|
|
|
|
|
%:
|
2024-08-13 17:22:25 +02:00
|
|
|
dh $@
|
2023-06-26 23:26:28 +02:00
|
|
|
|
2024-08-13 17:22:25 +02:00
|
|
|
CONFFLAGS = \
|
|
|
|
-Dauto_features=enabled \
|
|
|
|
-Degl_device=true \
|
|
|
|
-Dremote_desktop=true \
|
|
|
|
-Dwayland_eglstream=true
|
|
|
|
export deb_udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,)
|
2023-02-23 21:01:49 +01:00
|
|
|
|
2024-08-13 17:22:25 +02:00
|
|
|
ifneq ($(filter i386,$(DEB_HOST_ARCH)),)
|
|
|
|
CONFFLAGS +=-Dprofiler=false
|
2023-02-23 21:01:49 +01:00
|
|
|
endif
|
|
|
|
|
2024-08-13 17:22:25 +02:00
|
|
|
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
|
|
|
|
CONFFLAGS += --cross-file=$(DEB_HOST_GNU_TYPE)-gobject-introspection.ini
|
2023-06-26 23:26:28 +02:00
|
|
|
endif
|
2023-02-23 21:01:49 +01:00
|
|
|
|
2024-08-13 17:22:25 +02:00
|
|
|
override_dh_gnome_clean:
|
|
|
|
|
2023-02-23 21:01:49 +01:00
|
|
|
override_dh_auto_configure:
|
2023-10-15 19:21:17 +02:00
|
|
|
dh_auto_configure -- \
|
2023-02-23 21:01:49 +01:00
|
|
|
$(CONFFLAGS)
|
|
|
|
|
2024-08-13 17:22:25 +02:00
|
|
|
# Use meson test directly as it allows us to use the timeout multiplier
|
|
|
|
BUILDDIR=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)
|
|
|
|
TEST_COMMAND_BASE=env \
|
|
|
|
GIO_USE_VFS=local \
|
|
|
|
GIO_USE_VOLUME_MONITOR=unix \
|
|
|
|
GVFS_DISABLE_FUSE=1 \
|
|
|
|
dbus-run-session -- xvfb-run -s '+iglx -noreset' -a \
|
|
|
|
dh_auto_test -- -C $(BUILDDIR) --no-rebuild --verbose --timeout-multiplier 6 \
|
|
|
|
--no-stdsplit --print-errorlogs
|
|
|
|
TEST_COMMAND=$(TEST_COMMAND_BASE) --no-suite flaky
|
|
|
|
TEST_COMMAND_FLAKY=env DEB_ALLOW_FLAKY_TESTS=1 $(TEST_COMMAND_BASE) --suite flaky
|
2023-02-23 21:01:49 +01:00
|
|
|
|
2024-08-13 17:22:25 +02:00
|
|
|
# Ignore test failures on official architectures
|
|
|
|
# because it is believed that significant debian-installer/tasksel issues
|
|
|
|
# occur if task-gnome-desktop is not installable.
|
|
|
|
#
|
|
|
|
# We suspect that GNOME Shell might not work on mips64el and s390x.
|
|
|
|
# See gnome-settings-daemon where a simple mutter session fails there.
|
|
|
|
#
|
|
|
|
# But GNOME Shell is apparently usable on Ubuntu's riscv64:
|
|
|
|
# https://discourse.ubuntu.com/t/33807
|
|
|
|
#
|
|
|
|
# Please keep this list in sync with debian/tests/installed-tests
|
|
|
|
override_dh_auto_test:
|
|
|
|
ifeq (,$(filter mips64el riscv64 s390x,$(DEB_HOST_ARCH)))
|
|
|
|
$(TEST_COMMAND)
|
|
|
|
-$(TEST_COMMAND_FLAKY) --logbase flaky-tests
|
2023-10-15 19:21:17 +02:00
|
|
|
else
|
2024-08-13 17:22:25 +02:00
|
|
|
-$(TEST_COMMAND)
|
|
|
|
-$(TEST_COMMAND_FLAKY) --logbase flaky-tests
|
2023-10-15 19:21:17 +02:00
|
|
|
endif
|
|
|
|
|
2024-08-13 17:22:25 +02:00
|
|
|
# debhelper >= 13.4 makes all of /usr/libexec executable, which is not
|
|
|
|
# quite right for installed-tests
|
|
|
|
override_dh_fixperms:
|
|
|
|
dh_fixperms -Xusr/libexec/installed-tests
|
|
|
|
ifneq ($(filter %-tests,$(built_binaries)),)
|
|
|
|
chmod --recursive --changes a+rX,u+w,og-w debian/*-tests/usr/libexec/installed-tests
|
2023-10-15 19:21:17 +02:00
|
|
|
endif
|
2023-02-23 21:01:49 +01:00
|
|
|
|
2024-08-13 17:22:25 +02:00
|
|
|
override_dh_girepository:
|
|
|
|
dh_girepository /usr/lib/$(DEB_HOST_MULTIARCH)/mutter-$(MUTTER_API_VERSION)
|
|
|
|
|
|
|
|
override_dh_makeshlibs:
|
|
|
|
dh_makeshlibs -V
|
|
|
|
|
|
|
|
override_dh_shlibdeps:
|
|
|
|
dh_shlibdeps -Llibmutter-$(MUTTER_API_VERSION)-$(MUTTER_SONAME) \
|
|
|
|
-l/usr/lib/$(DEB_HOST_MULTIARCH)/mutter-$(MUTTER_API_VERSION)
|