[gnome-usage] build: Compile GSchemas in post install



commit 0f483608288c3a4ec27682714354688f15e9f2f8
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu Apr 20 15:44:25 2017 +0200

    build: Compile GSchemas in post install
    
    This is necessary when building from the source code.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781521

 build-aux/meson/postinstall.sh |   10 ++++++++++
 meson.build                    |    2 ++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/build-aux/meson/postinstall.sh b/build-aux/meson/postinstall.sh
new file mode 100644
index 0000000..4500dcb
--- /dev/null
+++ b/build-aux/meson/postinstall.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Package managers set this so we don't need to run
+if [ -z "$DESTDIR" ]; then
+  echo Compiling GSettings schemas...
+  glib-compile-schemas ${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas
+
+  echo Updating desktop database...
+  update-desktop-database -q ${MESON_INSTALL_PREFIX}/share/applications
+fi
diff --git a/meson.build b/meson.build
index 2ea2718..838371c 100644
--- a/meson.build
+++ b/meson.build
@@ -13,3 +13,5 @@ subdir('data')
 subdir('po')
 subdir('external')
 subdir('src')
+
+meson.add_install_script ('build-aux/meson/postinstall.sh')


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