summaryrefslogtreecommitdiff
path: root/meson_post_install.py
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2021-10-07 21:36:04 +0800
committerraveit65 <[email protected]>2021-10-15 21:33:59 +0200
commitf1c1e72d96c11194ff89752a4e22b6edffa75666 (patch)
tree66b1ef28de295faa53273f025bb4ed0bdf8da733 /meson_post_install.py
parentddeb66b5af61a5367c8b72a5e5845317e82b62a4 (diff)
downloadmate-system-monitor-f1c1e72d96c11194ff89752a4e22b6edffa75666.tar.bz2
mate-system-monitor-f1c1e72d96c11194ff89752a4e22b6edffa75666.tar.xz
Add meson build support
Diffstat (limited to 'meson_post_install.py')
-rw-r--r--meson_post_install.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..b26c88a
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+install_prefix = os.environ['MESON_INSTALL_PREFIX']
+icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor')
+schemadir = os.path.join(install_prefix, 'share', 'glib-2.0', 'schemas')
+
+if not os.environ.get('DESTDIR'):
+ print('Update icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas', schemadir])