summaryrefslogtreecommitdiffstats
path: root/build-aux/meson/post_install.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:32:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:32:59 +0000
commitadb934701975f6b0214475d1a8d0d1ce727b9d4d (patch)
tree5688c745d10b64c8856586864ec416a6bdae881d /build-aux/meson/post_install.py
parentInitial commit. (diff)
downloadgedit-adb934701975f6b0214475d1a8d0d1ce727b9d4d.tar.xz
gedit-adb934701975f6b0214475d1a8d0d1ce727b9d4d.zip
Adding upstream version 3.38.1.upstream/3.38.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build-aux/meson/post_install.py')
-rwxr-xr-xbuild-aux/meson/post_install.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/build-aux/meson/post_install.py b/build-aux/meson/post_install.py
new file mode 100755
index 0000000..15b7838
--- /dev/null
+++ b/build-aux/meson/post_install.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+import sys
+
+libdir = sys.argv[1]
+datadir = sys.argv[2]
+
+# Packaging tools define DESTDIR and this isn't needed for them
+if 'DESTDIR' not in os.environ:
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas',
+ os.path.join(datadir, 'glib-2.0', 'schemas')])
+
+ print('Updating icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-qtf',
+ os.path.join(datadir, 'icons', 'hicolor')])
+
+ print('Updating desktop database...')
+ subprocess.call(['update-desktop-database', '-q',
+ os.path.join(datadir, 'applications')])
+
+ print('Compiling python modules...')
+ subprocess.call([sys.executable, '-m', 'compileall', '-f', '-q',
+ os.path.join(libdir, 'gedit', 'plugins')])
+
+ print('Compiling python modules (optimized versions) ...')
+ subprocess.call([sys.executable, '-O', '-m', 'compileall', '-f', '-q',
+ os.path.join(libdir, 'gedit', 'plugins')])