summaryrefslogtreecommitdiff
path: root/utils/post_install.py
diff options
context:
space:
mode:
authorMarty E. Plummer <[email protected]>2019-05-21 17:01:18 -0500
committerraveit65 <[email protected]>2019-05-22 10:30:33 +0200
commita30185610beb815648854207cb2a29d0fa9303dc (patch)
tree02b0804e1644da72d6ddb3f2e01facaee0fa81a9 /utils/post_install.py
parente98858d43feb08d52ba6e1f39532f618b1a2cc01 (diff)
downloadmate-desktop-a30185610beb815648854207cb2a29d0fa9303dc.tar.bz2
mate-desktop-a30185610beb815648854207cb2a29d0fa9303dc.tar.xz
treewide: add meson build
Signed-off-by: Marty E. Plummer <[email protected]>
Diffstat (limited to 'utils/post_install.py')
-rw-r--r--utils/post_install.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/utils/post_install.py b/utils/post_install.py
new file mode 100644
index 0000000..cc5e2a6
--- /dev/null
+++ b/utils/post_install.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
+datadir = os.path.join(prefix, 'share')
+
+# 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')])