summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2022-06-12 23:18:12 +0200
committerNiels De Graef <nielsdegraef@gmail.com>2022-06-13 16:57:04 +0200
commit9b1e76f70ea4d27e9d0b2b27dd4d24f200aa1e80 (patch)
treecad3b774f0665d00fb7ad7d7e791efc49902f68b
parent6a7a6fc74d8e23ff2f63a02edc0f7079197891d1 (diff)
downloadgcr-9b1e76f70ea4d27e9d0b2b27dd4d24f200aa1e80.tar.gz
meson: Use gnome.post_install()
Allows us to drop our custom post-install script, and fixes some known issues with it.
-rw-r--r--meson.build6
-rwxr-xr-xmeson_post_install.py28
2 files changed, 4 insertions, 30 deletions
diff --git a/meson.build b/meson.build
index e2dd727..c3d9ba3 100644
--- a/meson.build
+++ b/meson.build
@@ -131,6 +131,8 @@ if get_option('gtk_doc')
endif
# Post-install scripts
-meson.add_install_script('meson_post_install.py',
- get_option('datadir'),
+gnome.post_install(
+ gtk_update_icon_cache: true,
+ glib_compile_schemas: true,
+ update_desktop_database: true,
)
diff --git a/meson_post_install.py b/meson_post_install.py
deleted file mode 100755
index 9e5cbdf..0000000
--- a/meson_post_install.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import subprocess
-import sys
-
-# Env
-install_prefix = os.environ['MESON_INSTALL_DESTDIR_PREFIX']
-
-# Args
-datadir = sys.argv[1]
-
-icondir = os.path.join(install_prefix, datadir, 'icons', 'hicolor')
-schemadir = os.path.join(install_prefix, datadir, 'glib-2.0', 'schemas')
-mimedatabasedir = os.path.join(install_prefix, datadir, 'mime')
-
-# We don't want to mess around when packaging environments
-if os.environ.get('DESTDIR'):
- sys.exit(0)
-
-print('Update icon cache...')
-subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
-
-print('Compiling gsettings schemas...')
-subprocess.call(['glib-compile-schemas', schemadir])
-
-print('Updating MIME database...')
-subprocess.call(['update-mime-database', mimedatabasedir])