[frogr/meson: 8/16] meson: Add post-installation trigger script, and use it



commit 2e6c318d355ced39940c370e47171d1a6695b8ac
Author: Mario Sanchez Prada <msanchez gnome org>
Date:   Tue May 23 19:02:14 2017 +0100

    meson: Add post-installation trigger script, and use it

 build-aux/post-install.sh |   10 ++++++++++
 meson.build               |    5 +++++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/build-aux/post-install.sh b/build-aux/post-install.sh
new file mode 100755
index 0000000..2775f08
--- /dev/null
+++ b/build-aux/post-install.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Package managers define DESTDIR, so this is not needed
+if [ -z "$DESTDIR" ]; then
+  echo Updating desktop database...
+  update-desktop-database -q ${MESON_INSTALL_PREFIX}/share/applications
+
+  echo Updating icon cache...
+  gtk-update-icon-cache -q -t -f ${MESON_INSTALL_PREFIX}/share/icons/hicolor
+fi
diff --git a/meson.build b/meson.build
index 6e31b31..648ae3b 100644
--- a/meson.build
+++ b/meson.build
@@ -91,3 +91,8 @@ subdir ('src')
 subdir ('data')
 subdir ('help')
 subdir ('po')
+
+
+# Post-installation trigger
+
+meson.add_install_script ('build-aux/post-install.sh')


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