summaryrefslogtreecommitdiff
path: root/meson_post_install.py
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-06-19 22:04:32 +0800
committerlukefromdc <[email protected]>2019-07-13 22:26:39 +0000
commitd86c29b0e518f765e7570573c76bc033fbd17f6d (patch)
treea4ac9135d5328c8955f4a60b70ee86a5ee22150c /meson_post_install.py
parent9c6676b1efa27aa103b5eddb28f97488a63a5190 (diff)
downloadmarco-d86c29b0e518f765e7570573c76bc033fbd17f6d.tar.bz2
marco-d86c29b0e518f765e7570573c76bc033fbd17f6d.tar.xz
switch to use meson build system
Diffstat (limited to 'meson_post_install.py')
-rwxr-xr-xmeson_post_install.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100755
index 00000000..96a0818b
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,22 @@
+#!/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')])