[devhelp] meson: post-install script
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] meson: post-install script
- Date: Thu, 22 Mar 2018 16:33:22 +0000 (UTC)
commit a206e4bab9c7d6a91eaf9fb4d2375bc78fe610f3
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Mar 15 13:26:29 2018 +0100
meson: post-install script
meson.build | 5 +++++
meson_post_install.py | 15 +++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/meson.build b/meson.build
index 3713380..8917ad4 100644
--- a/meson.build
+++ b/meson.build
@@ -152,6 +152,11 @@ subdir('devhelp')
subdir('src')
subdir('unit-tests')
+meson.add_install_script(
+ 'meson_post_install.py',
+ join_paths(get_option('prefix'), get_option('datadir'))
+)
+
# Print a summary of the configuration
output = 'Configuration:\n\n'
output += ' Devhelp version ' + meson.project_version() + '\n\n'
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..9c80a73
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+import sys
+
+data_dir = sys.argv[1]
+
+icon_dir = os.path.join(data_dir, 'icons', 'hicolor')
+print('Update icon cache...')
+subprocess.call(['gtk-update-icon-cache', '-f', '-t', icon_dir])
+
+schema_dir = os.path.join(data_dir, 'glib-2.0', 'schemas')
+print('Compiling gsettings schemas...')
+subprocess.call(['glib-compile-schemas', schema_dir])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]