summaryrefslogtreecommitdiff
path: root/meson_post_install.py
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2023-10-19 11:41:29 +0800
committerLuke from DC <[email protected]>2023-12-27 04:24:30 +0000
commitbca3b80da6b3653ada9e0546a3fd053cdc4651d0 (patch)
tree91882520deb84786b2b2a7bf20470039d19265c8 /meson_post_install.py
parentc2e94e1925f3c7acfa3fd3352dc8fdafe6375adc (diff)
downloadmate-control-center-bca3b80da6b3653ada9e0546a3fd053cdc4651d0.tar.bz2
mate-control-center-bca3b80da6b3653ada9e0546a3fd053cdc4651d0.tar.xz
Add meson build support
Diffstat (limited to 'meson_post_install.py')
-rw-r--r--meson_post_install.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 00000000..02a57a21
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+import sys
+
+gsettingsschemadir = os.path.join(sys.argv[1], 'glib-2.0', 'schemas')
+icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
+mimedir = os.path.join(sys.argv[1], 'mime')
+
+if not os.environ.get('DESTDIR'):
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas', gsettingsschemadir])
+
+ print('Update icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+
+ print('Update mime database...')
+ subprocess.call(['update-mime-database', '-V', mimedir])