summaryrefslogtreecommitdiff
path: root/meson_post_install.py
diff options
context:
space:
mode:
authorLogan Rathbone <poprocks@gmail.com>2021-06-08 22:55:49 -0400
committerLogan Rathbone <poprocks@gmail.com>2021-06-08 22:55:49 -0400
commitae51b769019ea5e4c32ec6e386f3d2183562c1cb (patch)
tree7944059592bcd59a662a35c18705c6c242263217 /meson_post_install.py
parentRemove superfluous MAINTAINERS file. (diff)
downloadzenity-ae51b769019ea5e4c32ec6e386f3d2183562c1cb.tar.gz
zenity-ae51b769019ea5e4c32ec6e386f3d2183562c1cb.tar.bz2
zenity-ae51b769019ea5e4c32ec6e386f3d2183562c1cb.zip
Port build system from autotools to meson.
Diffstat (limited to 'meson_post_install.py')
-rw-r--r--meson_post_install.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 00000000..2654e49d
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
+datadir = os.path.join(prefix, 'share')
+
+# Packaging tools define DESTDIR and this isn't needed for them
+if 'DESTDIR' not in os.environ:
+ print('Updating icon cache...')
+ icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
+ if not os.path.exists(icon_cache_dir):
+ os.makedirs(icon_cache_dir)
+ subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])
bgstack15