#!/usr/bin/make -f

# Turn off features of Inkscape and its dependencies that would normally
# try to connect to the D-Bus session bus
export DBUS_SESSION_BUS_ADDRESS=invalid:
export GIO_USE_MEMORY_MONITOR=none
export GIO_USE_NETWORK_MONITOR=netlink
export GIO_USE_PORTALS=0
export GIO_USE_POWER_PROFILE_MONITOR=none
export GIO_USE_VFS=local
export GIO_USE_VOLUME_MONITOR=unix
export GSETTINGS_BACKEND=memory
export GTK_USE_PORTAL=0
unexport XDG_RUNTIME_DIR

%:
	dh $@

execute_after_dh_auto_install:
	# Remove .face and .face.icon, already provided by kali-themes
	rm -f  debian/desktop-base/etc/skel/.face*
	rmdir  debian/desktop-base/etc/skel || true
	# Don't show Debian wallpapers in GNOME settings
	rm -fr debian/desktop-base/usr/share/gnome-background-properties
	# Don't show Debian wallpapers in KDE settings
	rm -fr debian/desktop-base/usr/share/wallpapers
	# Fix issues with the wallpaper in KDE 5.26
	rm -fr debian/desktop-base/usr/share/plasma/
