[gnome-system-monitor] Added meson post-install script



commit f47b08cef48dd9e1efc73e3b37fe6adaace80b8e
Author: Robert Roth <robert roth off gmail com>
Date:   Mon Jul 30 22:54:57 2018 +0300

    Added meson post-install script

 meson.build           |  2 ++
 meson_post_install.py | 17 +++++++++++++++++
 2 files changed, 19 insertions(+)
---
diff --git a/meson.build b/meson.build
index a9188e4b..4e2595e6 100644
--- a/meson.build
+++ b/meson.build
@@ -198,3 +198,5 @@ message('\n'.join(['',
 '        wnck support:           @0@ @1@'.format(libwnck.found(),
       libwnck.found() ? '(this will likely make system-monitor segfault)' : ''),
 ]))
+
+meson.add_install_script('meson_post_install.py')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 00000000..2ab6b22b
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,17 @@
+#!/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])
+
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]