[gnome-usage] build: Fix post install script
- From: Petr Štětka <pstetka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-usage] build: Fix post install script
- Date: Thu, 21 Dec 2017 17:30:25 +0000 (UTC)
commit 8036b613c94e921fd2c54d46fed2adf3445a6a98
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Wed Dec 20 16:40:48 2017 +0100
build: Fix post install script
meson uses a post install script for compiling gsettings schemas
and also updating the desktop database. However, it assumes that the
data directory is the share directory under prefix, which might not
be correct because the user can choose a different directory.
This patch uses the data directory used by meson by passing it to
the post install script.
build-aux/meson/postinstall.sh | 6 +++---
meson.build | 5 ++++-
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/build-aux/meson/postinstall.sh b/build-aux/meson/postinstall.sh
index 4500dcb..f68496f 100644
--- a/build-aux/meson/postinstall.sh
+++ b/build-aux/meson/postinstall.sh
@@ -1,10 +1,10 @@
#!/bin/sh
# Package managers set this so we don't need to run
-if [ -z "$DESTDIR" ]; then
+if [ -z "$DESTDIR" ] && [ $# -gt 0 ]; then
echo Compiling GSettings schemas...
- glib-compile-schemas ${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas
+ glib-compile-schemas $1/glib-2.0/schemas
echo Updating desktop database...
- update-desktop-database -q ${MESON_INSTALL_PREFIX}/share/applications
+ update-desktop-database -q $1/applications
fi
diff --git a/meson.build b/meson.build
index ef4d2c5..41c503c 100644
--- a/meson.build
+++ b/meson.build
@@ -27,4 +27,7 @@ subdir('po')
subdir('external')
subdir('src')
-meson.add_install_script ('build-aux/meson/postinstall.sh')
+meson.add_install_script(
+ join_paths('build-aux', 'meson', 'postinstall.sh'),
+ join_paths(get_option('prefix'), get_option('datadir'))
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]