summaryrefslogtreecommitdiffstats
path: root/meson_post_install.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:41:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:41:01 +0000
commitcc02f613f361981a338db8916e7516e5001253c0 (patch)
tree2a83d7350ec7b2877249a1588891d718caf56c06 /meson_post_install.py
parentInitial commit. (diff)
downloadgnome-session-cc02f613f361981a338db8916e7516e5001253c0.tar.xz
gnome-session-cc02f613f361981a338db8916e7516e5001253c0.zip
Adding upstream version 3.38.0.upstream/3.38.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'meson_post_install.py')
-rw-r--r--meson_post_install.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..e2e352c
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+
+import os
+import shutil
+import subprocess
+import sys
+
+if os.environ.get('DESTDIR'):
+ install_root = os.environ.get('DESTDIR') + os.path.abspath(sys.argv[1])
+else:
+ install_root = sys.argv[1]
+
+if not os.environ.get('DESTDIR'):
+ schemadir = os.path.join(install_root, 'glib-2.0', 'schemas')
+ print('Compile gsettings schemas...')
+ subprocess.call(['glib-compile-schemas', schemadir])
+
+# FIXME: this is due to unable to copy a generated target file:
+# https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0
+dst_dir = os.path.join(install_root, 'wayland-sessions')
+if not os.path.exists(dst_dir):
+ os.makedirs(dst_dir)
+
+src = os.path.join(install_root, 'xsessions', 'gnome.desktop')
+dst = os.path.join(dst_dir, 'gnome.desktop')
+shutil.copyfile(src, dst)