summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2018-03-18 22:07:32 +0100
committerFlorian Müllner <fmuellner@gnome.org>2018-03-18 22:42:02 +0100
commit025bf7531d23c8266f5543a516b3dbfcd29db7ba (patch)
treed521826a07e5de68479c955be50704155e36fdb1
parent788fb5547ca7290a2a6b62da66b839b1d25214b0 (diff)
downloadgnome-shell-wip/fmuellner/meson-postinstall.tar.gz
build: Run postinstall script where necessarywip/fmuellner/meson-postinstall
Package managers usually take care of compiling GSettings schemas and updating the .desktop database on installation, but when building manually from source, we should perform the aforementioned actions ourselves. https://gitlab.gnome.org/GNOME/gnome-shell/issues/127
-rw-r--r--meson.build2
-rwxr-xr-xmeson/meson-postinstall.sh10
2 files changed, 12 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 57640eb46..9cc1e5f0f 100644
--- a/meson.build
+++ b/meson.build
@@ -189,3 +189,5 @@ subdir('tests')
if get_option('gtk_doc')
subdir('docs/reference')
endif
+
+meson.add_install_script('meson/meson-postinstall.sh')
diff --git a/meson/meson-postinstall.sh b/meson/meson-postinstall.sh
new file mode 100755
index 000000000..4500dcb01
--- /dev/null
+++ b/meson/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